cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.73k stars 3.16k forks source link

Manual migration of CT project doesn't allow me to continue after making changes #21914

Closed sync-by-unito[bot] closed 1 year ago

sync-by-unito[bot] commented 2 years ago

Current Behavior

After my initial migration everything looks okay, but my config.cypress.ts wasn't able to be automatically updated for component testing. when clicking into the component testing section to configure it, i'm presented with a set of options and eventually some additional manual changes i need to make, the first one being to merge some additional changes into the component section of the config file. however, when i do that and save it, the section doesn't get a green checkmark and the Continue button at the bottom is still disabled, even though the other steps already have a green checkmark.

Note: if i close the runner and open it again, component testing shows as configured

!Screen Recording 2022-05-19 at 12.42.45 PM.mov|width=2560,height=1440!

https://cypressio.slack.com/archives/C02MW5QBD4K/p1652978872801989

Desired Behavior

It should recognize that the manual changes have been made and not prohibit me from continuing.

Reproducible Steps

This was done on the arm64 build of node 14.17.0

  1. Clone cypress-services
  2. Checkout commit 4b8abde176c4f934349cfa6d6f4093c0a8f4d51a
  3. Run yarn install
    1. If you get an error about bcrypt not being able to be installed, change the version to ^5.0.1 in packages/auth/package.json
  4. cd into frontend/packages/cypress-common and run yarn add -D <beta-url>
  5. Run yarn again to install
  6. cd into frontend/packages/dashboard and run yarn cypress verify to make sure the version is right
  7. Open the runner and do the migration as normal
  8. Try to click into the Component Testing section, which wasn’t able to be configured
  9. Choose React and webpack and go to the next screen
  10. Attempt to merge the changes to the component section of config.cypress.ts and save the file

┆Issue is synchronized with this Jira Bug by Unito ┆Attachments: Screen Recording 2022-05-19 at 12.42.45 PM.mov ┆author: Alex Beardsley ┆epic: CT Post Unification Release ┆friendlyId: UNIFY-1781 ┆priority: High ┆sprint: Backlog ┆taskType: Bug

sync-by-unito[bot] commented 2 years ago

➤ Jennifer Shehane commented:

Via David Rowe

https://cypressio.slack.com/archives/C02MW5QBD4K/p1652979680936789?thread_ts=1652978872.801989&cid=C02MW5QBD4K ( https://cypressio.slack.com/archives/C02MW5QBD4K/p1652979680936789?thread_ts=1652978872.801989&cid=C02MW5QBD4K|smart-card )

Same thing here with a fresh nextjs app.Initial:

import { defineConfig } from 'cypress'

export default defineConfig({ projectId: 'fauwbf', component: { setupNodeEvents(on, config) {}, specPattern: 'cypress/pages/*/.spec.{ts,tsx}', }, })modified:

import { defineConfig } from 'cypress'

export default defineConfig({ projectId: 'fauwbf', component: { devServer: { framework: 'next', bundler: 'webpack', },
setupNodeEvents(on, config) {}, specPattern: 'cypress/pages/*/.spec.{ts,tsx}', }, })Doesn't update the configuration section.From the docs: also doesn't update

import { defineConfig } from 'cypress'

export default defineConfig({ component: { devServer: { framework: 'next', bundler: 'webpack', }, }, })

github-actions[bot] commented 1 year ago

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

cypress-app-bot commented 1 year ago

This issue has been closed due to inactivity.