summaryrefslogtreecommitdiff
path: root/addons/pos_restaurant/static/tests/tours/helpers/ChromeTourMethods.js
blob: d60e39864cc2f9c883d004faf2c083c2f3fdd85b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
odoo.define('pos_restaurant.tour.ChromeTourMethods', function (require) {
    'use strict';

    const { createTourMethods } = require('point_of_sale.tour.utils');
    const { Do } = require('point_of_sale.tour.ChromeTourMethods');

    class DoExt extends Do {
        backToFloor() {
            return [
                {
                    content: 'back to floor',
                    trigger: '.floor-button',
                },
            ];
        }
    }

    class Check {
        backToFloorTextIs(floor, table) {
            return [
                {
                    content: `back to floor text is '${floor} ( ${table} )'`,
                    trigger: `.floor-button span:contains("${floor}") ~ .table-name:contains("${table}")`,
                    run: () => {},
                },
            ];
        }
    }

    class Execute {}

    return createTourMethods('Chrome', DoExt, Check, Execute);
});