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: supportFile path and supportFile false for vite on windows #21156

Merged
merged 3 commits into from
Apr 25, 2022

Conversation

ZachJW34
Copy link
Contributor

@ZachJW34 ZachJW34 commented Apr 20, 2022

User facing changelog

Fix supportFile error for applications using vite-dev-server for CT testing.

Additional details

There were two issues with how we were handling the support file.

  1. We were not providing a second argument for .replace, causing the replaced value to become undefined link
  2. We were using string methods on a potential boolean value link

This PR fixes both of them. I developed this PR on my Windows machine. All the tests for @cypress/vite-dev-server were failing for Windows but now they are passing. I also added additional test coverage for both webpack and vite dev-servers for supportFile: false.

How has the user experience changed?

Before:

before

vite-windows-error

After:

after

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@ZachJW34 ZachJW34 requested review from a team as code owners April 20, 2022 22:59
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 20, 2022

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Apr 20, 2022



Test summary

17883 0 217 0Flakiness 2


Run details

Project cypress
Status Passed
Commit d0b0b52
Started Apr 25, 2022 7:26 PM
Ended Apr 25, 2022 7:40 PM
Duration 14:23 💡
OS Linux Debian - 10.10
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/e2e/next.cy.ts Flakiness
1 Working with next-12 > should detect new spec
2 Working with next-11-webpack-4 > should live-reload on src changes

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

@ZachJW34 ZachJW34 requested a review from tbiethman April 21, 2022 22:13
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.

One comment on readability.

@ZachJW34 ZachJW34 force-pushed the zachw/fix-vite-support-file-windows branch from 122c0a4 to 34c87f0 Compare April 25, 2022 14:19
Copy link
Contributor

@tbiethman tbiethman left a comment

Choose a reason for hiding this comment

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

Verified vite-dev-server tests are passing on my Windows VM

@ZachJW34 ZachJW34 merged commit dd180c8 into 10.0-release Apr 25, 2022
@ZachJW34 ZachJW34 deleted the zachw/fix-vite-support-file-windows branch April 25, 2022 20:58
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.

5 participants