| 1 |
|
| 2 |
|
| 3 |
import * as ProductScreen from "@point_of_sale/../tests/pos/tours/utils/product_screen_util"; |
| 4 |
import * as Chrome from "@point_of_sale/../tests/pos/tours/utils/chrome_util"; |
| 5 |
import * as Dialog from "@point_of_sale/../tests/generic_helpers/dialog_util"; |
| 6 |
import * as Numpad from "@point_of_sale/../tests/generic_helpers/numpad_util"; |
| 7 |
import { registry } from "@web/core/registry"; |
| 8 |
|
| 9 |
registry.category("web_tour.tours").add("test_03_pos_with_lots", { |
| 10 |
steps: () => |
| 11 |
[ |
| 12 |
Chrome.startPoS(), |
| 13 |
Dialog.confirm("Open Register"), |
| 14 |
|
| 15 |
ProductScreen.clickDisplayedProduct("Monitor Stand"), |
| 16 |
ProductScreen.enterLotNumber("1", "lot"), |
| 17 |
ProductScreen.selectedOrderlineHas("Monitor Stand", "1"), |
| 18 |
ProductScreen.clickReview(), |
| 19 |
{ ...ProductScreen.clickLine("Monitor Stand")[0], isActive: ["mobile"] }, |
| 20 |
Numpad.click("2"), |
| 21 |
{ ...ProductScreen.back(), isActive: ["mobile"] }, |
| 22 |
ProductScreen.totalAmountIs("6.38"), |
| 23 |
ProductScreen.clickDisplayedProduct("Monitor Stand"), |
| 24 |
ProductScreen.enterLotNumber("2", "lot"), |
| 25 |
ProductScreen.clickReview(), |
| 26 |
{ ...ProductScreen.clickLine("Monitor Stand")[0], isActive: ["mobile"] }, |
| 27 |
Numpad.click("3"), |
| 28 |
{ ...ProductScreen.back(), isActive: ["mobile"] }, |
| 29 |
ProductScreen.totalAmountIs("15.95"), |
| 30 |
ProductScreen.clickPriceList("min_quantity ordering"), |
| 31 |
ProductScreen.totalAmountIs("5.00"), |
| 32 |
ProductScreen.clickReview(), |
| 33 |
{ ...ProductScreen.clickLine("Monitor Stand")[0], isActive: ["mobile"] }, |
| 34 |
Numpad.click("⌫"), |
| 35 |
{ ...ProductScreen.back(), isActive: ["mobile"] }, |
| 36 |
ProductScreen.totalAmountIs("6.38"), |
| 37 |
ProductScreen.isShown(), |
| 38 |
].flat(), |
| 39 |
}); |
| 40 |
|
| 41 |
registry.category("web_tour.tours").add("test_lot_tracking_without_lot_creation", { |
| 42 |
steps: () => |
| 43 |
[ |
| 44 |
Chrome.startPoS(), |
| 45 |
Dialog.confirm("Open Register"), |
| 46 |
ProductScreen.clickDisplayedProduct("Monitor Stand"), |
| 47 |
ProductScreen.totalAmountIs("3.19"), |
| 48 |
ProductScreen.clickDisplayedProduct("Monitor Stand"), |
| 49 |
ProductScreen.totalAmountIs("6.38"), |
| 50 |
].flat(), |
| 51 |
}); |