-
Notifications
You must be signed in to change notification settings - Fork 1.1k
update documentations around test isolation #4797
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
Conversation
One more update to add more Dashboard advocacy to the Why Cypress page. This adds extra copy to the Features section to better surface the unique benefits of Dashboard subscription.
#4796) * update experimental warning for session to reflect async/attach changes in 10.9.0 * Update content/api/commands/session.md Co-authored-by: Matt Henkes <[email protected]> Co-authored-by: Matt Henkes <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…-cloud-cta CLOUD-295: Add Dashboard CTAs to "Why Cypress -> Features"
…ta-codebuild Add note about git metadata issues to AWS CodeBuild page
<Icon name="check-circle" color="green"></Icon> **Best Practice:** Clean up | ||
state **before** tests run. | ||
<Icon name="check-circle" color="green"></Icon> **Best Practice:** Tests should | ||
always be able to be run independently from one another **and still pass**. |
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.
I think this captures the idempotency talked about in cypress-io/cypress#24316 (comment)
|
||
Cypress supports the following modes of test isolation in end-to-end testing to | ||
describe if a suite of tests should run in a clean browser context or not: | ||
`legacy` (deprecated), `on` (experimental) and `off` (experimental). |
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.
It feels weird that the only options for test isolation are either experimental
or deprecated
. I get it, but it also feels like we don't officially support any of these. Wonder if there is a different way to brand this in the docs?
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.
yeahhh.....I could use (current) but it'll be removed/changed in the next few months & wanted to call it out now. Thoughts on current
?
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.
I am thinking current
works until we release 11.0, in which we say it's removed. It sounds like we don't actually plan to deprecate it, just remove it.
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.
Is there any way we can just scrub legacy from a discussion point? I doubt very many people have even set it. Could we do something like, ignore the testIsolation setting (it's always legacy) unless experimental is enabled?
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.
Could we do something like, ignore the testIsolation setting (it's always legacy) unless experimental is enabled?
well it does do this, I'm just struggling with introducing the config differences when experimental is on and describing the documentation. Any ideas?
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.
okay legacy has been removed. 👍🏻
|
||
Cypress only support testIsolation `on` in component testing. | ||
|
||
When running component tests, the browser context will allow start in a clean |
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.
Ah I think the parity is starting to click for me now!
Co-authored-by: Bill Glesias <[email protected]>
Co-authored-by: Bill Glesias <[email protected]>
…/cypress-documentation into change-test-isolation
content/api/commands/session.md
Outdated
|
||
The `cy.session()` command will inherent the | ||
[`testIsolation`](/guides/core-concepts/writing-and-organizing-tests#Test-Isolation) | ||
mode` value to determine where or not the page is cleared when cacheing and |
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.
mode` value to determine where or not the page is cleared when cacheing and | |
mode value to determine where or not the page is cleared when caching and |
content/api/commands/session.md
Outdated
@@ -81,7 +87,7 @@ cy.session(name, () => { | |||
// be done inside the setup function | |||
cy.visit('/login') | |||
cy.session(name, () => { | |||
// need to call cy.visit() here because the page is blank when | |||
// need to call cy.visit() here because the page is blank when |
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.
// need to call cy.visit() here because the page is blank when | |
// need to call cy.visit() here because the page is blank when |
content/api/commands/session.md
Outdated
[`cy.visit()`](/api/commands/visit) must be explicitly called afterwards to | ||
ensure the page to test is loaded. | ||
|
||
### Test Isolation `iff` |
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.
### Test Isolation `iff` | |
### Test Isolation `off` |
Co-authored-by: Matt Henkes <[email protected]>
Co-authored-by: Matt Henkes <[email protected]>
Co-authored-by: Ryan Manuel <[email protected]> Co-authored-by: Matt Henkes <[email protected]>
Co-authored-by: Ryan Manuel <[email protected]>
* 10.11.0 * Update cy.origin dependencies / remove Cypress.require() (#4789) * update documentations around test isolation (#4797) Co-authored-by: Matt Henkes <[email protected]> Co-authored-by: Bill Glesias <[email protected]> Co-authored-by: Ryan Manuel <[email protected]> Co-authored-by: DEBRIS APRON <[email protected]> * Updating changelog * Removing duplicate changelog entry * Update content/_changelogs/10.11.0.md Co-authored-by: Matt Henkes <[email protected]> * Adding "Experimental Breaking Changes" section * Moving one issue in changelog and running prettier * Moving a few items around in the changelog * Updating changelog copy for cy.session support in Webkit Co-authored-by: Emily Rohrbough <[email protected]> Co-authored-by: Matt Henkes <[email protected]> Co-authored-by: Bill Glesias <[email protected]> Co-authored-by: Ryan Manuel <[email protected]> Co-authored-by: DEBRIS APRON <[email protected]> Co-authored-by: Stokes Player <[email protected]>
No description provided.