-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Move retry tests that are intended to retry to system tests to…
… reduce flake (#28881) * Move currentRetries tests to a system test to reduce flake * empty commit * remove typo on test title * Migrate origin retries test, which purposefully retries, into a system test * Snapshot updates around the 'errors errors' typo * Fix port issue * Update origin test to reuse existing html files in directory
- Loading branch information
1 parent
4a6d483
commit 9ea0e9c
Showing
8 changed files
with
225 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
system-tests/projects/e2e/cypress/e2e/current_retries.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
context('.currentRetry', () => { | ||
describe('test is not retried', () => { | ||
before(() => { | ||
expect(Cypress.currentRetry).to.eq(0) | ||
}) | ||
|
||
beforeEach(() => { | ||
expect(Cypress.currentRetry).to.eq(0) | ||
}) | ||
|
||
afterEach(() => { | ||
expect(Cypress.currentRetry).to.eq(0) | ||
}) | ||
|
||
after(() => { | ||
expect(Cypress.currentRetry).to.eq(0) | ||
}) | ||
|
||
it('correctly returns currentRetry', () => { | ||
expect(Cypress.currentRetry).to.eq(0) | ||
}) | ||
}) | ||
|
||
describe('test is retried due to beforeEach hook failure', { retries: 1 }, () => { | ||
before(() => { | ||
expect(Cypress.currentRetry).to.be.oneOf([0, 1]) | ||
}) | ||
|
||
beforeEach(() => { | ||
expect(Cypress.currentRetry).to.eq(1) | ||
}) | ||
|
||
it('correctly returns currentRetry', () => { | ||
expect(Cypress.currentRetry).to.eq(1) | ||
}) | ||
|
||
afterEach(() => { | ||
expect(Cypress.currentRetry).to.eq(1) | ||
}) | ||
|
||
after(() => { | ||
expect(Cypress.currentRetry).to.eq(1) | ||
}) | ||
}) | ||
|
||
describe('test is retried due to test failure', { retries: 1 }, () => { | ||
before(() => { | ||
expect(Cypress.currentRetry).to.be.oneOf([0, 1]) | ||
}) | ||
|
||
beforeEach(() => { | ||
expect(Cypress.currentRetry).to.be.oneOf([0, 1]) | ||
}) | ||
|
||
it('correctly returns currentRetry', () => { | ||
expect(Cypress.currentRetry).to.eq(1) | ||
}) | ||
|
||
afterEach(() => { | ||
expect(Cypress.currentRetry).to.eq(1) | ||
}) | ||
|
||
after(() => { | ||
expect(Cypress.currentRetry).to.eq(1) | ||
}) | ||
}) | ||
|
||
describe('test is retried due to afterEach hook failure', { retries: 1 }, () => { | ||
before(() => { | ||
expect(Cypress.currentRetry).to.be.oneOf([0, 1]) | ||
}) | ||
|
||
beforeEach(() => { | ||
expect(Cypress.currentRetry).to.be.oneOf([0, 1]) | ||
}) | ||
|
||
it('correctly returns currentRetry', () => { | ||
expect(Cypress.currentRetry).to.be.oneOf([0, 1]) | ||
}) | ||
|
||
afterEach(() => { | ||
expect(Cypress.currentRetry).to.eq(1) | ||
}) | ||
|
||
after(() => { | ||
expect(Cypress.currentRetry).to.eq(1) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
9ea0e9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
linux x64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
9ea0e9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
linux arm64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
9ea0e9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
darwin x64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
9ea0e9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
win32 x64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally:
9ea0e9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
darwin arm64
version of the Test Runner.Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version
Run this command to install the pre-release locally: