12 lines
293 B
JavaScript
12 lines
293 B
JavaScript
|
/* @odoo-module */
|
||
|
|
||
|
import { triggerEvent } from "@web/../tests/helpers/utils";
|
||
|
|
||
|
export function simulateBarCode(chars, target = document.body, selector = undefined) {
|
||
|
for (let char of chars) {
|
||
|
triggerEvent(target, selector, "keydown", {
|
||
|
key: char,
|
||
|
});
|
||
|
}
|
||
|
}
|