UNPKG

wdio-wait-for

Version:

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

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