addons/point_of_sale/static/tests/generic_helpers/number_popup_util.js
raw| 1 | import * as Numpad from "@point_of_sale/../tests/generic_helpers/numpad_util"; |
| 2 | |
| 3 | export function enterValue(keys) { |
| 4 | return Numpad.enterValue(keys).map((step) => ({ |
| 5 | ...step, |
| 6 | trigger: `.modal ${step.trigger}`, |
| 7 | })); |
| 8 | } |
| 9 | export function isShown(val = "") { |
| 10 | return [ |
| 11 | { |
| 12 | content: `input shown is '${val}'`, |
| 13 | trigger: `.modal .value:contains("${val}")`, |
| 14 | }, |
| 15 | ]; |
| 16 | } |