cypress-cucumber-steps
Version:
Cypress Cucumber step definitions
34 lines • 1.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.When_I_set_attribute = When_I_set_attribute;
var cypress_cucumber_preprocessor_1 = require("@badeball/cypress-cucumber-preprocessor");
var utils_1 = require("../utils");
/**
* When I set attribute:
*
* ```gherkin
* When I set attribute {string} to {string}
* ```
*
* [**_GENERALLY DO NOT USE THIS AND PREFER STEPS THAT RESEMBLE HOW USERS USE YOUR SITE._**](https://testing-library.com/docs/guiding-principles/)
*
* @example
*
* ```gherkin
* When I set attribute "checked" to "checked"
* ```
*
* @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 "Input"
* And I set attribute "checked" to "checked"
* ```
*/
function When_I_set_attribute(name, value) {
(0, utils_1.getCypressElement)().invoke('attr', name, value);
}
(0, cypress_cucumber_preprocessor_1.When)('I set attribute {string} to {string}', When_I_set_attribute);
//# sourceMappingURL=attribute.js.map