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(vite): only rerun if current spec/deps changed #17269

Merged
merged 2 commits into from
Jul 26, 2021

Conversation

elevatebart
Copy link
Contributor

@elevatebart elevatebart commented Jul 9, 2021

User facing changelog

The spec rerun only happens when the current spec is updated.
Instead of happening even when another spec gets updated.

Reproduction

  • Open Cypress component testing with vite-dev-server
    • cd npm/vite-dev-server
    • yarn cy:open
  • Open a spec file in cypress
  • Open another spec file in vscode
  • change the open file in vscode and save
  • Even if the current spec is not impacted, it is still re-run

@elevatebart elevatebart requested a review from a team as a code owner July 9, 2021 21:02
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 9, 2021

Thanks for taking the time to open a PR!

@elevatebart elevatebart requested review from jennifer-shehane and kuceb and removed request for a team July 9, 2021 21:02
@jennifer-shehane
Copy link
Member

@elevatebart If this is ready for review, can you provide a reproducible example to run to see this behavior? Or write an automated test to run in our repo for this?

@elevatebart
Copy link
Contributor Author

elevatebart commented Jul 9, 2021

@jennifer-shehane I have split this PR in 2 since one can be delivered immediately and the other will be delivered with the binary #17270

@elevatebart elevatebart force-pushed the fix/some-vite-love branch from 29e3222 to c1ed4ce Compare July 9, 2021 22:11
@elevatebart elevatebart changed the title fix(vite): autorefresh new spec files fix(vite): only rerun if current spec/deps changed Jul 9, 2021
@cypress
Copy link

cypress bot commented Jul 9, 2021



Test summary

18193 0 214 7Flakiness 3


Run details

Project cypress
Status Passed
Commit e0d2a49
Started Jul 26, 2021 1:35 AM
Ended Jul 26, 2021 1:46 AM
Duration 10:48 💡
OS Linux Debian - 10.8
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

retries.ui.spec.js Flakiness
1 runner/cypress retries.ui.spec > opens attempt on each attempt failure for the screenshot, and closes after test passes
commands/net_stubbing_spec.ts Flakiness
1 network stubbing > intercepting response > can throttle a proxy response using res.setThrottle
2 network stubbing > intercepting request > can intercept utf-8 request bodies without crashing

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

@lmiller1990 lmiller1990 self-requested a review July 26, 2021 01:31
Copy link
Contributor

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

I tried it out, works great. I wonder how we can test this kind of thing.

@lmiller1990 lmiller1990 merged commit 1433b64 into develop Jul 26, 2021
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.

3 participants