-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test Isolation #22230
Comments
We need to break this issue up into smaller issues before we assign it out. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
#24206 will close this issue with recent discussions on how test isolation is defined. There will be two modes of test isolation,
When test isolation is |
Are there plans to clear |
@piotrpalek EDIT: I just ran a more verbose example set per #20397, and it does not seem that Test Isolation does not completely resolves the intercept bleed-over. I ran this snippet: for(let i = 0; i < 1000; i++) {
it('can wait on a single request using "alias.request"', function () {
cy.intercept('/foo*')
.as('foo.bar')
.then(() => {
Cypress.$.get('/foo')
})
.wait('@foo.bar.request')
})
it('can timeout waiting on a single request using "alias.request"', function (done) {
cy.on('fail', (err) => {
expect(err.message).to.contain('No request ever occurred.')
done()
})
cy.intercept('/foo*')
.as('foo.bar')
.wait('@foo.bar.request', { timeout: 100 })
})
} Which produced 2000 tests cases. And there were 15 failures (about 0.75% fail rate) . Leaving #20397 open as unresolved. We can have further conversations there. |
The work related to Test Isolation has been completed. This will be released with Cypress 12. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Updated to reflect latest design decisions:
There will be two modes of test isolation,
on
andoff
, withon
being the new default mode. When test isolation ison
, before each test, Cypress will:about:blank
When test isolation is
off
, Cypress will not clear the browser context or the page.The text was updated successfully, but these errors were encountered: