UNPKG

cypress-cucumber-steps

Version:
74 lines 1.94 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.When_I_wait_seconds = When_I_wait_seconds; exports.When_I_wait_milliseconds = When_I_wait_milliseconds; var cypress_cucumber_preprocessor_1 = require("@badeball/cypress-cucumber-preprocessor"); /** * When I wait seconds: * * ```gherkin * When I wait {int} seconds * ``` * * @example * * Plural step: * * ```gherkin * When I wait 3 seconds * ``` * * Singular step: * * ```gherkin * When I wait 1 second * ``` * * @remarks * * Prefer increasing Cypress config's [`defaultCommandTimeout`](https://docs.cypress.io/guides/core-concepts/retry-ability#Timeouts) instead of relying on [`wait`](https://docs.cypress.io/api/commands/wait). * * @see * * - {@link When_I_wait_milliseconds | When I wait milliseconds} */ function When_I_wait_seconds(seconds) { When_I_wait_milliseconds(seconds * 1000); } (0, cypress_cucumber_preprocessor_1.When)('I wait {int} seconds', When_I_wait_seconds); (0, cypress_cucumber_preprocessor_1.When)('I wait {int} second', When_I_wait_seconds); /** * When I wait milliseconds: * * ```gherkin * When I wait {int} milliseconds * ``` * * @example * * Plural step: * * ```gherkin * When I wait 300 milliseconds * ``` * * Singular step: * * ```gherkin * When I wait 1 millisecond * ``` * * @remarks * * Prefer increasing Cypress config's [`defaultCommandTimeout`](https://docs.cypress.io/guides/core-concepts/retry-ability#Timeouts) instead of relying on [`wait`](https://docs.cypress.io/api/commands/wait). * * @see * * - {@link When_I_wait_seconds | When I wait seconds} */ function When_I_wait_milliseconds(milliseconds) { cy.wait(milliseconds); } (0, cypress_cucumber_preprocessor_1.When)('I wait {int} milliseconds', When_I_wait_milliseconds); (0, cypress_cucumber_preprocessor_1.When)('I wait {int} millisecond', When_I_wait_milliseconds); //# sourceMappingURL=wait.js.map