UNPKG

cypress-cucumber-steps

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