-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: do not show incorrectly support file migration step #22015
fix: do not show incorrectly support file migration step #22015
Conversation
Thanks for taking the time to open a PR!
|
import _ from 'lodash' | ||
|
||
export const isDefaultSupportFile = (supportFile: string) => { | ||
if (_.isNil(supportFile) || !_.isBoolean(supportFile) && supportFile.match(/^cypress\/support($|\/index($|\.(ts|js|coffee)$))/)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the coffee
ext here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fill in the PR template please? Now that we're back in develop
, it's more important to keep the history clean
….com:cypress-io/cypress into alejandro/fix/migration-step-for-supportFile
import _ from 'lodash' | ||
|
||
export const isDefaultSupportFile = (supportFile: string) => { | ||
if (_.isNil(supportFile) || !_.isBoolean(supportFile) && supportFile.match(/^cypress\/support($|\/index($|\.(ts|js|coffee)$))/)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this code was lifted, but what happens if the user has ./cypress/support/index.js
(prefixed with "./"). This is the default file but the regex wouldn't match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should update the regex for something like (^|\.+\/)cypress\/support($|\/index($|\.(ts|js|coffee)$))
what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in 2e5b5d6
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
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 |
User facing changelog
We were showing the supportFile migration step, based on a default
supportFile
which was a hardcoded string, making the migration flow, show this step even if the custom supportFile set on the config file includes it partially, like for example "repo/src/platform/testing/e2e/cypress/support/index.js"Additional details
Steps to test
cypress/support/index.
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?