Cypress doesn't wait 10 seconds (the global timeout amount) to finish tests anymore.
Instead of using the Watcher.idle() to know when Cypress archives can be complete, I'm not waiting at all. This is because cy.visit() (the command to visit a page) already waits for all resources to be loaded before it completes.
This also means users' Cypress tests aren't any slower when they add Chromatic since we're not waiting a minimum of 500ms after each test.
Also changed
Watcher.idle() is pulled out and into the Playwright-specific code since 1) Cypress doesn't need it and 2) it doesn't need access to any Watcher class variables
I removed a couple Watcher methods that were either 1) unused (setResponse()) or 2) were only used for logging and weren't actually ever even hit (requestWillBeSent() and responseReceived())
How to test
Watch the tests pass below
Locally, run Playwright tests
Verify that Playwright tests still finish once network is idle
Verify that Playwright tests still wait until global timeout (10 seconds) if network isn't idle
Locally, run Cypress tests
Verify that Cypress tests run quickly (not waiting 10 seconds between tests as they did before).
[x] Author QA
Change Type
[ ] maintenance
[ ] documentation
[x] patch
[ ] minor
[ ] major
📦 Published PR as canary version: 0.0.55--canary.54.b107684.0
:sparkles: Test out this PR locally via:
```bash
npm install @chromaui/test-archiver@0.0.55--canary.54.b107684.0
# or
yarn add @chromaui/test-archiver@0.0.55--canary.54.b107684.0
```
What Changed
Cypress doesn't wait 10 seconds (the global timeout amount) to finish tests anymore.
Instead of using the
Watcher.idle()
to know when Cypress archives can be complete, I'm not waiting at all. This is becausecy.visit()
(the command to visit a page) already waits for all resources to be loaded before it completes.This also means users' Cypress tests aren't any slower when they add Chromatic since we're not waiting a minimum of
500ms
after each test.Also changed
Watcher.idle()
is pulled out and into the Playwright-specific code since 1) Cypress doesn't need it and 2) it doesn't need access to anyWatcher
class variablesWatcher
methods that were either 1) unused (setResponse()
) or 2) were only used for logging and weren't actually ever even hit (requestWillBeSent()
andresponseReceived()
)How to test
Watch the tests pass below
Locally, run Playwright tests
Verify that Playwright tests still finish once network is idle
Verify that Playwright tests still wait until global timeout (10 seconds) if network isn't idle
Locally, run Cypress tests
Verify that Cypress tests run quickly (not waiting 10 seconds between tests as they did before).
[x] Author QA
Change Type
maintenance
documentation
patch
minor
major
📦 Published PR as canary version:
0.0.55--canary.54.b107684.0
:sparkles: Test out this PR locally via: ```bash npm install @chromaui/test-archiver@0.0.55--canary.54.b107684.0 # or yarn add @chromaui/test-archiver@0.0.55--canary.54.b107684.0 ```