maests
Version:
An executable compiler for creating Maestro's yaml-flows with typescript.
40 lines (39 loc) • 693 B
JavaScript
import { addOut } from "../out.mjs";
const waitForAnimationEnd = (maxWait = 5e3) => {
addOut(
maxWait ? `- waitForAnimationToEnd:
timeout: ${maxWait}
` : `- waitForAnimationToEnd
`
);
}, waitUntilVisible = (id, maxWait) => {
addOut(
`- extendedWaitUntil:
visible:
id: "${id}"
timeout: ${maxWait ?? 5e3}
`
);
}, waitUntilNotVisible = (id, maxWait) => {
addOut(
`- extendedWaitUntil:
notVisible:
id: "${id}"
timeout: ${maxWait ?? 5e3}
`
);
}, wait = (ms) => {
addOut(
`- swipe:
start: -1, -1
end: -1, -100
duration: ${ms}
`
);
};
export {
wait,
waitForAnimationEnd,
waitUntilNotVisible,
waitUntilVisible
};