cypress-cucumber-steps
Version:
Cypress Cucumber step definitions
54 lines • 1.44 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.When_I_type = When_I_type;
var cypress_cucumber_preprocessor_1 = require("@badeball/cypress-cucumber-preprocessor");
var utils_1 = require("../utils");
/**
* When I type:
*
* ```gherkin
* When I type {string}
* ```
*
* @example
*
* ```gherkin
* When I type "Hello, world!"
* ```
*
* With [options](https://docs.cypress.io/api/commands/type#Arguments):
*
* ```gherkin
* When I type "Hello, world!"
* | animationDistanceThreshold | 5 |
* | delay | 10 |
* | force | false |
* | log | true |
* | parseSpecialCharSequences | true |
* | release | true |
* | scrollBehavior | top |
* | timeout | 4000 |
* | waitForAnimations | true |
* ```
*
* @remarks
*
* A preceding step like {@link When_I_find_element_by_label_text | "When I find element by label text"} is required. For example:
*
* ```gherkin
* When I find element by label text "Email"
* And I type "user@example.com"
* ```
*
* Text may include [special character sequences](https://docs.cypress.io/api/commands/type#Syntax). For example:
*
* ```gherkin
* # types the Enter key
* When I type "{enter}"
* ```
*/
function When_I_type(text, options) {
(0, utils_1.getCypressElement)().type(text, (0, utils_1.getOptions)(options));
}
(0, cypress_cucumber_preprocessor_1.When)('I type {string}', When_I_type);
//# sourceMappingURL=type.js.map