|
| 1 | +/* |
| 2 | + Copyright (C) 2022-Today GRAP (http://www.grap.coop) |
| 3 | + @author Sylvain LE GAL (https://twitter.com/legalsylvain) |
| 4 | + License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html |
| 5 | +*/ |
| 6 | +odoo.define("pos_customer_comment.tour.PosCustomerComment", function (require) { |
| 7 | + "use strict"; |
| 8 | + |
| 9 | + const Tour = require("web_tour.tour"); |
| 10 | + |
| 11 | + var steps = [ |
| 12 | + { |
| 13 | + content: "Test pos_customer_content: Waiting for loading to finish", |
| 14 | + trigger: "body:not(:has(.loader))", |
| 15 | + }, |
| 16 | + { |
| 17 | + content: "Test pos_customer_content: open customer list", |
| 18 | + trigger: "button.set-partner", |
| 19 | + }, |
| 20 | + { |
| 21 | + content: "Test pos_customer_content: select 'Addison Olson' Customer", |
| 22 | + trigger: ".partner-line:contains('Addison Olson') .edit-partner-button", |
| 23 | + }, |
| 24 | + { |
| 25 | + content: "Test pos_customer_content: Check if value is correctly loaded", |
| 26 | + trigger: "textarea[name='pos_comment']", |
| 27 | + run: () => { |
| 28 | + var content = $("textarea[name='pos_comment']"); |
| 29 | + if (!content.val().includes("Important")) { |
| 30 | + throw new Error("the PoS comment was not loaded in the frontend"); |
| 31 | + } |
| 32 | + }, |
| 33 | + }, |
| 34 | + { |
| 35 | + content: "Test pos_customer_content: Write new text in PoS Comment field", |
| 36 | + trigger: "textarea[name='pos_comment']", |
| 37 | + run: "text New Comment", |
| 38 | + }, |
| 39 | + { |
| 40 | + content: "Test pos_customer_content: Save Customer changes", |
| 41 | + trigger: ".partnerlist-screen .button.highlight", |
| 42 | + }, |
| 43 | + { |
| 44 | + content: "Test pos_customer_content: Close the Point of Sale frontend", |
| 45 | + trigger: ".header-button", |
| 46 | + }, |
| 47 | + { |
| 48 | + content: "Test pos_customer_content: Confirm closing the frontend", |
| 49 | + trigger: ".header-button", |
| 50 | + }, |
| 51 | + ]; |
| 52 | + |
| 53 | + Tour.register("PosCustomerCommentTour", {test: true, url: "/pos/ui"}, steps); |
| 54 | +}); |
| 55 | + |
| 56 | +/* */ |
0 commit comments