UNPKG

wdio-wait-for

Version:

a library of conditions that are useful for end-to-end tests

17 lines (16 loc) 523 B
import { logicalChain } from './logicalChain.js'; /** * Chain a number of expected conditions using logical or, short circuiting * at the first expected condition that evaluates to true. * * @example * browser.waitUntil(or(numberOfWindowsToBe(3), numberOfWindowsToBe(2)))); * * @param {...Function} args Arguments * * @returns {!function} An expected condition that returns a promise which * evaluates to the result of the logical or. */ export function or(...args) { return logicalChain(false, args); }