UNPKG

cypress-cucumber-steps

Version:
87 lines 2.33 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Then_I_see_element_exists = Then_I_see_element_exists; exports.Then_I_see_element_does_not_exist = Then_I_see_element_does_not_exist; var cypress_cucumber_preprocessor_1 = require("@badeball/cypress-cucumber-preprocessor"); var utils_1 = require("../utils"); /** * Then I see element exists: * * ```gherkin * Then I see element exists * ``` * * Assert element **_exists_** in the screen. * * @example * * ```gherkin * Then I see element exists * ``` * * With options: * * ```gherkin * Then I see element exists * | 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 exists * ``` * * @see * * - {@link Then_I_see_element_is_visible | Then I see element is visible} * - {@link Then_I_see_element_does_not_exist | Then I see element does not exist} */ function Then_I_see_element_exists(options) { (0, utils_1.getCypressElement)().should('exist', (0, utils_1.getOptions)(options)); } (0, cypress_cucumber_preprocessor_1.Then)('I see element exists', Then_I_see_element_exists); /** * Then I see element does not exist: * * ```gherkin * Then I see element does not exist * ``` * * Assert element **_does not exist_** in the screen. * * @example * * ```gherkin * Then I see element does not exist * ``` * * With options: * * ```gherkin * Then I see element does not exist * | timeout | 4000 | * ``` * * @remarks * * A preceding step like {@link When_I_get_element_by_selector | "When I get element by selector"} is required. For example: * * ```gherkin * When I get element by selector ".loading" * Then I see element does not exist * ``` * * @see * * - {@link Then_I_see_element_is_not_visible | Then I see element is not visible} * - {@link Then_I_see_element_exists | Then I see element exists} */ function Then_I_see_element_does_not_exist(options) { (0, utils_1.getCypressElement)().should('not.exist', (0, utils_1.getOptions)(options)); } (0, cypress_cucumber_preprocessor_1.Then)('I see element does not exist', Then_I_see_element_does_not_exist); //# sourceMappingURL=exist.js.map