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: do not show incorrectly support file migration step #22015

Merged
merged 11 commits into from
Jun 1, 2022

Conversation

estrada9166
Copy link
Member

@estrada9166 estrada9166 commented Jun 1, 2022

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

  1. Create a supportFile in a path that is not the default but includes cypress/support/index.
  2. Run the migration

How has the user experience changed?

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?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 1, 2022

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)$))/)) {
Copy link
Member Author

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

@estrada9166 estrada9166 marked this pull request as ready for review June 1, 2022 20:47
@estrada9166 estrada9166 requested review from a team and tgriesser as code owners June 1, 2022 20:47
@estrada9166 estrada9166 requested review from jennifer-shehane and removed request for a team June 1, 2022 20:47
@estrada9166 estrada9166 requested a review from flotwig June 1, 2022 20:52
Copy link
Contributor

@flotwig flotwig left a 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)$))/)) {
Copy link
Contributor

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

Copy link
Member Author

@estrada9166 estrada9166 Jun 1, 2022

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?

Copy link
Member Author

@estrada9166 estrada9166 Jun 1, 2022

Choose a reason for hiding this comment

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

Updated in 2e5b5d6

@cypress
Copy link

cypress bot commented Jun 1, 2022



Test summary

37553 0 454 0Flakiness 3


Run details

Project cypress
Status Passed
Commit 60f3006
Started Jun 1, 2022 10:30 PM
Ended Jun 1, 2022 10:47 PM
Duration 16:50 💡
OS Linux Debian - 10.11
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/proxy-logging.cy.ts Flakiness
1 Proxy Logging > request logging > xhr log has response body/status code when xhr response is logged second
2 Proxy Logging > request logging > xhr log has response body/status code when xhr response is logged second
e2e/origin/commands/assertions.cy.ts Flakiness
1 cy.origin assertions > #consoleProps > .should() and .and()

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

@mjhenkes mjhenkes merged commit 9caf623 into develop Jun 1, 2022
@mjhenkes mjhenkes deleted the alejandro/fix/migration-step-for-supportFile branch June 1, 2022 23:15
@mjhenkes mjhenkes linked an issue Jun 1, 2022 that may be closed by this pull request
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.

Cypress 10 migration tool does not work with custom support file path
5 participants