UNPKG

cypress-cucumber-steps

Version:
73 lines 1.87 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Then_I_see_search = Then_I_see_search; exports.Then_I_see_search_contains = Then_I_see_search_contains; var cypress_cucumber_preprocessor_1 = require("@badeball/cypress-cucumber-preprocessor"); var utils_1 = require("../../utils"); /** * Then I see search: * * ```gherkin * Then I see search {string} * ``` * * @example * * ```gherkin * Then I see search "?key=value" * ``` * * With [options](https://docs.cypress.io/api/commands/location#Arguments): * * ```gherkin * Then I see search "?key=value" * | log | true | * | timeout | 4000 | * ``` * * @remarks * * The location search (query string) includes the `?` character. * * @see * * - {@link Then_I_see_search_contains | Then I see search contains} */ function Then_I_see_search(search, options) { cy.location((0, utils_1.getOptions)(options)).should(function (location) { expect(location.search).to.equal(search); }); } (0, cypress_cucumber_preprocessor_1.Then)('I see search {string}', Then_I_see_search); /** * Then I see search contains: * * ```gherkin * Then I see search contains {string} * ``` * * @example * * ```gherkin * Then I see search contains "key=value" * ``` * * With [options](https://docs.cypress.io/api/commands/location#Arguments): * * ```gherkin * Then I see search contains "key=value" * | log | true | * | timeout | 4000 | * ``` * * @see * * - {@link Then_I_see_search | Then I see search} */ function Then_I_see_search_contains(search, options) { cy.location((0, utils_1.getOptions)(options)).should(function (location) { expect(location.search).to.contain(search); }); } (0, cypress_cucumber_preprocessor_1.Then)('I see search contains {string}', Then_I_see_search_contains); //# sourceMappingURL=search.js.map