Debian Codegraph @

addons/pos_restaurant/static/tests/tours/utils/tip_screen_util.js

raw
1 export function clickPercentTip(percent) {
2 return [
3 {
4 trigger: `.tip-screen .percentage:contains("${percent}")`,
5 run: "click",
6 },
7 ];
8 }
9 export function setCustomTip(amount) {
10 return [
11 {
12 trigger: `.tip-screen .custom-amount-form input`,
13 run: `edit ${amount}`,
14 },
15 ];
16 }
17 export function clickSettle() {
18 return [
19 {
20 trigger: `.button.highlight.next`,
21 run: "click",
22 },
23 ];
24 }
25
26 export function isShown() {
27 return [
28 {
29 trigger: ".pos .tip-screen",
30 },
31 ];
32 }
33 export function totalAmountIs(amount) {
34 return [
35 {
36 trigger: `.tip-screen .total-amount:contains("${amount}")`,
37 },
38 ];
39 }
40 export function percentAmountIs(percent, amount) {
41 return [
42 {
43 trigger: `.tip-screen .percentage:contains("${percent}") ~ .amount:contains("${amount}")`,
44 },
45 ];
46 }
47 export function inputAmountIs(amount) {
48 return [
49 {
50 trigger: `.tip-screen .custom-amount-form input[data-amount="${amount}"]`,
51 },
52 ];
53 }