cypress-cucumber-steps
Version:
Cypress Cucumber step definitions
69 lines • 1.93 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Then_I_see_document_title = Then_I_see_document_title;
exports.Then_I_see_document_title_contains = Then_I_see_document_title_contains;
var cypress_cucumber_preprocessor_1 = require("@badeball/cypress-cucumber-preprocessor");
var utils_1 = require("../utils");
/**
* Then I see document title:
*
* ```gherkin
* Then I see document title {string}
* ```
*
* @example
*
* Assert that the `document.title` property of the page is "Title":
*
* ```gherkin
* Then I see document title "Title"
* ```
*
* With [options](https://docs.cypress.io/api/commands/title#Arguments):
*
* ```gherkin
* Then I see document title "Title"
* | log | true |
* | timeout | 4000 |
* ```
*
* @see
*
* - {@link Then_I_see_document_title_contains | Then I see document title contains}
*/
function Then_I_see_document_title(title, options) {
cy.title((0, utils_1.getOptions)(options)).should('equal', title);
}
(0, cypress_cucumber_preprocessor_1.Then)('I see document title {string}', Then_I_see_document_title);
/**
* Then I see document title contains:
*
* ```gherkin
* Then I see document title contains {string}
* ```
*
* @example
*
* Assert that the document's title contains "Title":
*
* ```gherkin
* Then I see document title contains "Title"
* ```
*
* With [options](https://docs.cypress.io/api/commands/title#Arguments):
*
* ```gherkin
* Then I see document title contains "Title"
* | log | true |
* | timeout | 4000 |
* ```
*
* @see
*
* - {@link Then_I_see_document_title | Then I see document title}
*/
function Then_I_see_document_title_contains(title, options) {
cy.title((0, utils_1.getOptions)(options)).should('contain', title);
}
(0, cypress_cucumber_preprocessor_1.Then)('I see document title contains {string}', Then_I_see_document_title_contains);
//# sourceMappingURL=document-title.js.map