expect-webdriverio
Version:
WebdriverIO Assertion Library
10 lines (9 loc) • 355 B
JavaScript
export const wrapExpectedWithArray = (el, actual, expected) => {
if (Array.isArray(el) && el.length > 1 && Array.isArray(actual)) {
expected = [expected];
}
return expected;
};
export const isElementArray = (obj) => {
return obj !== null && typeof obj === 'object' && 'selector' in obj && 'foundWith' in obj && 'parent' in obj;
};