Skip to content

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

Merged
merged 24 commits into from
Oct 24, 2022

Conversation

emilyrohrbough
Copy link
Member

No description provided.

debrisapron and others added 6 commits October 18, 2022 10:11
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]>
@vercel
Copy link

vercel bot commented Oct 19, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
cypress-documentation ✅ Ready (Inspect) Visit Preview Oct 24, 2022 at 5:14PM (UTC)

…-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**.
Copy link
Contributor

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).
Copy link
Contributor

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?

Copy link
Member Author

@emilyrohrbough emilyrohrbough Oct 24, 2022

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?

Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Member Author

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?

Copy link
Member Author

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
Copy link
Contributor

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!


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
Copy link
Contributor

@ryanthemanuel ryanthemanuel Oct 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// need to call cy.visit() here because the page is blank when
// need to call cy.visit() here because the page is blank when

[`cy.visit()`](/api/commands/visit) must be explicitly called afterwards to
ensure the page to test is loaded.

### Test Isolation `iff`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Test Isolation `iff`
### Test Isolation `off`

@emilyrohrbough emilyrohrbough changed the base branch from master to release-10.11.0 October 24, 2022 23:04
@emilyrohrbough emilyrohrbough merged commit 68d26ea into release-10.11.0 Oct 24, 2022
@emilyrohrbough emilyrohrbough deleted the change-test-isolation branch October 24, 2022 23:04
mjhenkes added a commit that referenced this pull request Oct 25, 2022
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants