Debian Codegraph @

addons/point_of_sale/static/tests/pos/tours/utils/common.js

raw
1 export function back() {
2 return {
3 content: "go back to the products",
4 trigger: ".actionpad .back-button",
5 run: "click",
6 };
7 }
8
9 export function inLeftSide(steps) {
10 return [
11 {
12 isActive: ["mobile"],
13 content: "click review button",
14 trigger: ".btn-switchpane.review-button",
15 run: "click",
16 },
17 ...[steps].flat(),
18 { ...back(), isActive: ["mobile"] },
19 ];
20 }
21
22 export function waitForLoading() {
23 return [
24 {
25 content: "waiting for loading to finish",
26 trigger: "body:not(:has(.loader))",
27 },
28 ];
29 }
30
31 export function selectButton(name) {
32 return {
33 content: `Select button ${name}`,
34 trigger: `button:contains("${name}")`,
35 run: "click",
36 };
37 }