summaryrefslogtreecommitdiff
path: root/addons/pos_restaurant/static/tests/tours/helpers/TextAreaPopupTourMethods.js
blob: 8f8333702719e9f01797ff58e1664a42fae8bab3 (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
34
35
36
37
38
39
odoo.define('pos_restaurant.tour.TextAreaPopupTourMethods', function (require) {
    'use strict';

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

    class Do {
        inputText(val) {
            return [
                {
                    content: `input text '${val}'`,
                    trigger: `.modal-dialog .popup-textarea textarea`,
                    run: `text ${val}`,
                },
            ];
        }
        clickConfirm() {
            return [
                {
                    content: 'confirm text input popup',
                    trigger: '.modal-dialog .confirm',
                },
            ];
        }
    }

    class Check {
        isShown() {
            return [
                {
                    content: 'text input popup is shown',
                    trigger: '.modal-dialog .popup-textarea',
                    run: () => {},
                },
            ];
        }
    }

    return createTourMethods('TextAreaPopup', Do, Check);
});