Skip to content
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

fix: reload every spec file when support updated #17598

Merged
merged 1 commit into from
Aug 4, 2021

Conversation

elevatebart
Copy link
Contributor

User facing changelog

Using [email protected] and @cypress/[email protected] saving support files or its dependencies does not re-run the tests.
Since support is imported before every specFile, it should re-run the tests of the open spec file.
This PR makes sure the tests are re-run.

Technical explanation

In cypress<8, component testing always re-run the current test whenever any dependency of any test is updated.

In cypress>8, component testing compile:success can take a specFile flag to scope the refresh to a specFile. This way when you change the dependencies of spec A and only spec B is open, the tests are not re-run with exactly the same result. If no specFile is specified, cypress re-runs anyway.

supportFile is not exactly a spec but was considered as such in <8.

It is now treated separately (which simplifies the code and the logs)

@elevatebart elevatebart requested a review from cowboy August 4, 2021 15:04
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 4, 2021

Thanks for taking the time to open a PR!

@elevatebart elevatebart added component testing npm: @cypress/vite-dev-server @cypress/vite-dev-server package issues labels Aug 4, 2021
@cypress
Copy link

cypress bot commented Aug 4, 2021



Test summary

18192 0 214 7Flakiness 4


Run details

Project cypress
Status Passed
Commit 9d393a5
Started Aug 4, 2021 2:58 PM
Ended Aug 4, 2021 3:09 PM
Duration 11:15 💡
OS Linux Debian - 10.8
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/commands/net_stubbing_spec.ts Flakiness
1 network stubbing > intercepting request > can intercept utf-8 request bodies without crashing
2 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"
3 network stubbing > intercepting request > should delay the same amount on every response
4 network stubbing > waiting and aliasing > can timeout incrementally waiting on requests

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link
Contributor

@cowboy cowboy left a comment

Choose a reason for hiding this comment

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

I tested this locally in an example repo with yarn link and it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm: @cypress/vite-dev-server @cypress/vite-dev-server package issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants