diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/pos_restaurant/static/tests/tours/ControlButtons.tour.js | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/pos_restaurant/static/tests/tours/ControlButtons.tour.js')
| -rw-r--r-- | addons/pos_restaurant/static/tests/tours/ControlButtons.tour.js | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/addons/pos_restaurant/static/tests/tours/ControlButtons.tour.js b/addons/pos_restaurant/static/tests/tours/ControlButtons.tour.js new file mode 100644 index 00000000..3b6e499a --- /dev/null +++ b/addons/pos_restaurant/static/tests/tours/ControlButtons.tour.js @@ -0,0 +1,48 @@ +odoo.define('pos_restaurant.tour.ControlButtons', function (require) { + 'use strict'; + + const { TextAreaPopup } = require('pos_restaurant.tour.TextAreaPopupTourMethods'); + const { Chrome } = require('pos_restaurant.tour.ChromeTourMethods'); + const { FloorScreen } = require('pos_restaurant.tour.FloorScreenTourMethods'); + const { ProductScreen } = require('pos_restaurant.tour.ProductScreenTourMethods'); + const { SplitBillScreen } = require('pos_restaurant.tour.SplitBillScreenTourMethods'); + const { BillScreen } = require('pos_restaurant.tour.BillScreenTourMethods'); + const { getSteps, startSteps } = require('point_of_sale.tour.utils'); + var Tour = require('web_tour.tour'); + + // signal to start generating steps + // when finished, steps can be taken from getSteps + startSteps(); + + // Test TransferOrderButton + FloorScreen.do.clickTable('T2'); + ProductScreen.exec.addOrderline('Water', '5', '2', '10.0'); + ProductScreen.do.clickTransferButton(); + FloorScreen.do.clickTable('T4'); + ProductScreen.do.clickOrderline('Water', '5', '2'); + Chrome.do.backToFloor(); + FloorScreen.do.clickTable('T2'); + ProductScreen.check.orderIsEmpty(); + Chrome.do.backToFloor(); + FloorScreen.do.clickTable('T4'); + ProductScreen.do.clickOrderline('Water', '5', '2'); + + // Test SplitBillButton + ProductScreen.do.clickSplitBillButton(); + SplitBillScreen.do.clickBack(); + + // Test OrderlineNoteButton + ProductScreen.do.clickNoteButton(); + TextAreaPopup.check.isShown(); + TextAreaPopup.do.inputText('test note'); + TextAreaPopup.do.clickConfirm(); + ProductScreen.check.orderlineHasNote('Water', '5', 'test note'); + ProductScreen.exec.addOrderline('Water', '8', '1', '8.0'); + + // Test PrintBillButton + ProductScreen.do.clickPrintBillButton(); + BillScreen.check.isShown(); + BillScreen.do.clickBack(); + + Tour.register('ControlButtonsTour', { test: true, url: '/pos/ui' }, getSteps()); +}); |
