cypress-cucumber-steps
Version:
Cypress Cucumber step definitions
45 lines • 1.29 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.When_I_screenshot = When_I_screenshot;
var cypress_cucumber_preprocessor_1 = require("@badeball/cypress-cucumber-preprocessor");
/**
* When I screenshot:
*
* ```gherkin
* When I screenshot
* ```
*
* When I screenshot with filename:
*
* ```gherkin
* When I screenshot {string}
* ```
*
* The screenshot will be stored in the [screenshots folder](https://docs.cypress.io/guides/references/configuration#Folders--Files) (e.g., `cypress/screenshots`).
*
* @example
*
* Take a screenshot with an autogenerated filename:
*
* ```gherkin
* When I screenshot
* ```
*
* Take a screenshot with a specified filename:
*
* ```gherkin
* When I screenshot "path/to/screenshot"
* ```
*
* _When passed a path, the folder structure will be created._
*
* @remarks
*
* Takes a screenshot of the application under test. See [naming conventions](https://docs.cypress.io/api/commands/screenshot#Naming-conventions).
*/
function When_I_screenshot(filename) {
cy.screenshot(filename);
}
(0, cypress_cucumber_preprocessor_1.When)('I screenshot', When_I_screenshot);
(0, cypress_cucumber_preprocessor_1.When)('I screenshot {string}', When_I_screenshot);
//# sourceMappingURL=screenshot.js.map