CivicActions / cypress-tests

A repository to store Cypress test recipes created by CivicActions engineers
Other
5 stars 3 forks source link

Cypress 12.0 Features #15

Open alexfinnarn opened 1 year ago

alexfinnarn commented 1 year ago

While setting up Cypress for this repo, the cypress open command now has helpful release notes displayed before you get to the test runner screens.

Screen Shot 2022-12-20 at 4 44 25 PM

I really like this update and how it makes it easier to follow the main changes. From my perspective, I thought two updates are worth making examples of:

Feel free to add other features that would be good to capture in examples and docs. I haven't tried the component testing out so I'm not sure what's going on with non-e2e Cypress testing features.

https://docs.cypress.io/guides/references/changelog#12-0-0

Dang...they are already on 12.2.0...I can't keep up.

brentonkelly1982 commented 1 year ago

Hey @alexfinnarn, I work on the Provider Data Catalog (PDC) product. We recently upgraded Cypress from v10.16.0 to v12.3.0. We have 914 tests in our suite right now.

Some of the most notable things that affected us were

It took me several days to work through this update. I hope this helps.

alexfinnarn commented 1 year ago

Thanks for the update @brentonkelly1982 ! Very good notes to have.

Every single test must now be completely set up from scratch...

So would you say the test isolation change caused the biggest impact while upgrading the test suite?

I haven't gotten a chance to look at the Open Data projects' test suites yet, but for the Drupal sites, since most data is persisted in the Drupal database and cy.session() can preserve the login cookies/info so I don't anticipate much impact from that test isolation config change, except extra time running the whole test suite.

brentonkelly1982 commented 1 year ago

You bet @alexfinnarn!

So would you say the test isolation change caused the biggest impact while upgrading the test suite?

Yes, this was definitely the biggest impact. It caused me to edit every spec we have to add at least a cy.visit() to each test. For several tests, I had to also add actions in order to set the page up for the assertions given how our tests previously built off of each other.

alexfinnarn commented 1 year ago

@brentonkelly1982 You might want to look at the experimentalMemoryManagement configuration option in 12.4.0 https://docs.cypress.io/guides/references/changelog#12-4-0 to help with your memory issue.

brentonkelly1982 commented 1 year ago

Thanks @alexfinnarn. I upgrade our Cypress to 12.5.0 last week and added that in.