UNPKG

cypress-cucumber-steps

Version:
89 lines 2.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Then_I_see_element_is_visible = Then_I_see_element_is_visible; exports.Then_I_see_element_is_not_visible = Then_I_see_element_is_not_visible; var cypress_cucumber_preprocessor_1 = require("@badeball/cypress-cucumber-preprocessor"); var utils_1 = require("../utils"); /** * Then I see element is visible: * * ```gherkin * Then I see element is visible * ``` * * Assert element **_is visible_** in the screen. * * @example * * ```gherkin * Then I see element is visible * ``` * * With options: * * ```gherkin * Then I see element is visible * | timeout | 4000 | * ``` * * @remarks * * A preceding step like {@link When_I_find_element_by_text | "When I find element by text"} is required. For example: * * ```gherkin * When I find element by text "Text" * Then I see element is visible * ``` * * @see * * - {@link Then_I_see_element_is_not_visible | Then I see element is not visible} * - {@link Then_I_see_text | Then I see text} */ function Then_I_see_element_is_visible(options) { (0, utils_1.getCypressElement)().should('be.visible', (0, utils_1.getOptions)(options)); } (0, cypress_cucumber_preprocessor_1.Then)('I see element is visible', Then_I_see_element_is_visible); /** * Then I see element is not visible: * * ```gherkin * Then I see element is not visible * ``` * * Assert element **_exists_** but is **_hidden** in the screen. * * @example * * ```gherkin * Then I see element is not visible * ``` * * With options: * * ```gherkin * Then I see element is visible * | timeout | 4000 | * ``` * * @remarks * * A preceding step like {@link When_I_find_element_by_text | "When I find element by text"} is required. For example: * * ```gherkin * When I find element by text "Text" * Then I see element is not visible * ``` * * @see * * - {@link Then_I_do_not_see_text | Then I do not see text} * - {@link Then_I_do_not_see_visible_text | Then I do not see visible text} * - {@link Then_I_see_element_does_not_exist | Then I see element does not exist} * - {@link Then_I_see_element_is_visible | Then I see element is visible} */ function Then_I_see_element_is_not_visible(options) { (0, utils_1.getCypressElement)().should('not.be.visible', (0, utils_1.getOptions)(options)); } (0, cypress_cucumber_preprocessor_1.Then)('I see element is not visible', Then_I_see_element_is_not_visible); //# sourceMappingURL=visible.js.map