You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Error happened in task "allureReportTest" when the test is skipped in beforeEach()
To Reproduce
Steps to reproduce the behavior:
Set env var SKIP_TESTS to true.
Run the test which has a logic to conditionally skip the tests in beforeEach()
context('Conditional run', () => {
let skip = false;
before(() => {
cy.get('div').then(($div) => {
if (Cypress.env('SKIP_TESTS')) {
skip = true;
} else {
skip = false;
}
});
});
beforeEach(function () {
// use regular function here
if (skip) this.skip();
});
it('some test', () => {
expect(true).to.be.true;
});
});
Error occurred as below.
Expected behavior
Test can be skipped successfully and the result/report is generated.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: macOS
Browser: Chrome
Version 123.0.6312.107
Smartphone (please complete the following information):
Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]
Additional context
"allure-cypress": "^2.15.1",
The text was updated successfully, but these errors were encountered:
jillyj
changed the title
Error happened in task "allureReportTest" when the test is skipped in beforeEach()
Cypress: Error happened in task "allureReportTest" when the test is skipped in beforeEach()
Apr 16, 2024
Describe the bug
Error happened in task "allureReportTest" when the test is skipped in beforeEach()
To Reproduce
Steps to reproduce the behavior:
SKIP_TESTS
totrue
.beforeEach()
Expected behavior
Test can be skipped successfully and the result/report is generated.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
"allure-cypress": "^2.15.1",
The text was updated successfully, but these errors were encountered: