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): autorefresh new spec files #17270

Merged
merged 1 commit into from
Jul 12, 2021

Conversation

elevatebart
Copy link
Contributor

@elevatebart elevatebart commented Jul 9, 2021

User facing changelog

When adding a new spec file in vite-dev-server to run, the server is suppose to re-run the tests when making a change to it.
Previously, it was only done with files existing at startup. Now, the list of files updates.

Reproduction

  • open cypress open ct in vitejs. In this repo, the simplest is to do the following.
cd npm/vite-dev-server
yarn cy:open
  • Open one of the spec files in Cypress, open the same file in vscode

  • Change the file in vscode

  • It will re-run the current spec (expected)

  • Now add a new spec file (a file named npm/vite-dev-server/cypress/components/test.spec.js)

  • The file appears in Cypress

  • Click on it to open it

  • Now add a test in this new file and save

  • BUG: The file should be re-run and is simply left alone

  • FIXED: The file now re-runs

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 9, 2021

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Jul 9, 2021



Test summary

18185 0 214 7Flakiness 1


Run details

Project cypress
Status Passed
Commit eda294c
Started Jul 9, 2021 9:52 PM
Ended Jul 9, 2021 10:03 PM
Duration 10:53 💡
OS Linux Debian - 10.8
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/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

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

lmiller1990 commented Jul 12, 2021

Great, I followed the instructions and reproduced the problem. I checked out this branch and the bug is now fixed and working 👌

@lmiller1990 lmiller1990 merged commit 99f9352 into master Jul 12, 2021
@lmiller1990 lmiller1990 deleted the fix/make-vite-refresh-new-files branch July 12, 2021 02:03
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.

2 participants