UNPKG

@nice-digital/wdio-cucumber-steps

Version:

Shared step definitions for Cucumber JS BDD tests in WebdriverIO

20 lines 750 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkWithinViewport = void 0; /** * Check if the given element is visible inside the current viewport * @param {String} selector Element selector * @param {String} falseCase Whether to check if the element is visible * within the current viewport or not */ async function checkWithinViewport(selector, falseCase) { const element = await $(selector); if (falseCase) { expect(element).not.toBeDisplayedInViewport(); } else { expect(element).toBeDisplayedInViewport(); } } exports.checkWithinViewport = checkWithinViewport; //# sourceMappingURL=checkWithinViewport.js.map