UNPKG

cypress-cucumber-steps

Version:
74 lines 2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Then_I_see_button = Then_I_see_button; exports.Then_I_do_not_see_button = Then_I_do_not_see_button; var cypress_cucumber_preprocessor_1 = require("@badeball/cypress-cucumber-preprocessor"); var constants_1 = require("../constants"); var utils_1 = require("../utils"); /** * Then I see button: * * ```gherkin * Then I see button {string} * ``` * * Asserts button with text **_exists_** and is **_visible_** in the screen. * * @example * * ```gherkin * Then I see button "Button" * ``` * * With [options](https://docs.cypress.io/api/commands/get#Arguments): * * ```gherkin * Then I see button "Button" * | log | true | * | timeout | 4000 | * | withinSubject | null | * | includeShadowDom | false | * ``` * * @see * * - {@link Then_I_see_text | Then I see text} */ function Then_I_see_button(text, options) { (0, utils_1.getButtonElements)(text, constants_1.PseudoSelector.visible, options).should('exist'); } (0, cypress_cucumber_preprocessor_1.Then)('I see button {string}', Then_I_see_button); /** * Then I do not see button: * * ```gherkin * Then I do not see button {string} * ``` * * Asserts button with text **_does not exist_** or **_is not visible_** in the screen. * * @example * * ```gherkin * Then I do not see button "Button" * ``` * * With [options](https://docs.cypress.io/api/commands/get#Arguments): * * ```gherkin * Then I do not see button "Button" * | log | true | * | timeout | 4000 | * | withinSubject | null | * | includeShadowDom | false | * ``` * * @see * * - {@link Then_I_do_not_see_text | Then I do not see text} */ function Then_I_do_not_see_button(text, options) { (0, utils_1.getButtonElements)(text, constants_1.PseudoSelector.visible, options).should('not.exist'); } (0, cypress_cucumber_preprocessor_1.Then)('I do not see button {string}', Then_I_do_not_see_button); //# sourceMappingURL=button.js.map