mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-19 08:52:06 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
from . import test_module
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
# Copyright (C) 2022-Today GRAP (http://www.grap.coop)
|
||||
# @author Sylvain LE GAL (https://twitter.com/legalsylvain)
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
|
||||
from odoo.tests import tagged
|
||||
|
||||
from odoo.addons.point_of_sale.tests.test_frontend import TestPointOfSaleHttpCommon
|
||||
|
||||
|
||||
@tagged("post_install", "-at_install")
|
||||
class TestUi(TestPointOfSaleHttpCommon):
|
||||
def test_pos_customer_comment(self):
|
||||
self.main_pos_config.open_ui()
|
||||
self.main_pos_config.current_session_id.set_cashbox_pos(0, None)
|
||||
|
||||
self.start_tour(
|
||||
f"/pos/ui?config_id={self.main_pos_config.id}",
|
||||
"PosCustomerCommentTour",
|
||||
login="accountman",
|
||||
)
|
||||
customer = self.env.ref("base.res_partner_address_31")
|
||||
self.assertEqual(customer.pos_comment, "New Comment")
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
Copyright (C) 2022-Today GRAP (http://www.grap.coop)
|
||||
@author Sylvain LE GAL (https://twitter.com/legalsylvain)
|
||||
License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*/
|
||||
odoo.define("pos_customer_comment.tour.PosCustomerComment", function (require) {
|
||||
"use strict";
|
||||
|
||||
const Tour = require("web_tour.tour");
|
||||
|
||||
var steps = [
|
||||
{
|
||||
content: "Test pos_customer_content: Waiting for loading to finish",
|
||||
trigger: "body:not(:has(.loader))",
|
||||
},
|
||||
{
|
||||
content: "Test pos_customer_content: open customer list",
|
||||
trigger: "button.set-partner",
|
||||
},
|
||||
{
|
||||
content: "Test pos_customer_content: select 'Addison Olson' Customer",
|
||||
trigger: ".partner-line:contains('Addison Olson') .edit-partner-button",
|
||||
},
|
||||
{
|
||||
content: "Test pos_customer_content: Check if value is correctly loaded",
|
||||
trigger: "textarea[name='pos_comment']",
|
||||
run: () => {
|
||||
var content = $("textarea[name='pos_comment']");
|
||||
if (!content.val().includes("Important")) {
|
||||
throw new Error("the PoS comment was not loaded in the frontend");
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
content: "Test pos_customer_content: Write new text in PoS Comment field",
|
||||
trigger: "textarea[name='pos_comment']",
|
||||
run: "text New Comment",
|
||||
},
|
||||
{
|
||||
content: "Test pos_customer_content: Save Customer changes",
|
||||
trigger: ".partnerlist-screen .button.highlight",
|
||||
},
|
||||
{
|
||||
content: "Test pos_customer_content: Close the Point of Sale frontend",
|
||||
trigger: ".header-button",
|
||||
},
|
||||
{
|
||||
content: "Test pos_customer_content: Confirm closing the frontend",
|
||||
trigger: ".header-button",
|
||||
},
|
||||
];
|
||||
|
||||
Tour.register("PosCustomerCommentTour", {test: true, url: "/pos/ui"}, steps);
|
||||
});
|
||||
|
||||
/* */
|
||||
Loading…
Add table
Add a link
Reference in a new issue