UNPKG

cypress-cucumber-steps

Version:
93 lines 2.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.When_I_uncheck = When_I_uncheck; exports.When_I_uncheck_input = When_I_uncheck_input; var cypress_cucumber_preprocessor_1 = require("@badeball/cypress-cucumber-preprocessor"); var queries_1 = require("../queries"); var utils_1 = require("../utils"); /** * When I uncheck: * * ```gherkin * When I uncheck * ``` * * This element must be an `<input>` with type `checkbox`. * * @example * * Uncheck checkbox(es): * * ```gherkin * When I uncheck * ``` * * With [options](https://docs.cypress.io/api/commands/uncheck#Arguments): * * ```gherkin * When I uncheck * | animationDistanceThreshold | 5 | * | log | true | * | force | false | * | scrollBehavior | top | * | timeout | 4000 | * | waitForAnimations | true | * ``` * * @remarks * * A preceding step like {@link When_I_find_input_by_label_text | "When I find input by label text"} is required. For example: * * ```gherkin * When I find input by label text "Checkbox" * And I uncheck * ``` * * @see * * - {@link When_I_uncheck_input | When I uncheck input} * - {@link When_I_check | When I check} */ function When_I_uncheck(options) { (0, utils_1.getCypressElement)().uncheck((0, utils_1.getOptions)(options)); } (0, cypress_cucumber_preprocessor_1.When)('I uncheck', When_I_uncheck); /** * When I uncheck input: * * ```gherkin * When I uncheck input {string} * ``` * * Uncheck checkbox input by label text. * * @example * * ```gherkin * When I uncheck input "Text" * ``` * * With [options](https://docs.cypress.io/api/commands/uncheck#Arguments): * * ```gherkin * When I uncheck input "Text" * | animationDistanceThreshold | 5 | * | log | true | * | force | false | * | scrollBehavior | top | * | timeout | 4000 | * | waitForAnimations | true | * | pseudoSelector | visible | * ``` * * @see * * - {@link When_I_uncheck | When I uncheck} * - {@link When_I_check_input | When I check input} */ function When_I_uncheck_input(text, options) { (0, queries_1.When_I_find_input_by_label_text)(text, options); When_I_uncheck(); } (0, cypress_cucumber_preprocessor_1.When)('I uncheck input {string}', When_I_uncheck_input); //# sourceMappingURL=uncheck.js.map