Files
cypress/system-tests/projects/migration-component-testing-defaults/README.md
Cesar b16eb65eb2 fix: migrate config fields to correct the location (#19940)
* testFiles

* ignoreTestFiles

* supportFile

* use utility functions

* remove setupNodeEvents and supportfile from component

* don't throw for supportFiles query

* custom integrationFolder default testFiles

* add default e2e directory to e2e specPattern

* add missing type import

* work on migration project docs

* update docs

* use prettier to run assertion

* add detailed breakdown of expected config and update code to correspond

* remove unused code

* update comment

* update component testing migration expected configurations

* wip: tests for edge cases

* make plugins require relative

* do not add defineConfig if they do not have cypress 10

* edge case of define config

* system test

* do not show supportfile for CT only project

* fix: set correct config file on migration (#19990)

* fix: set correct config file on migration

* add e2e test

* Fix test

Co-authored-by: Cesar Avitia <cesar@cypress.io>

* fix: allow default support file to be TS

* test: with a ts support file

* refactor: duplicate hasTypeScript in migration

* move migration utils files

* rename functions that returns globs with globs

* fix(launchpad): Support migrating projects w/o pluginsFile  (#19993)

* handle case of no plugins file

* fix readme

* style: add comments

* build: fix types

Co-authored-by: ElevateBart <ledouxb@gmail.com>

* fix types

* fix migration unit-tests

* fix: build for unit types

* fix shouldShowSteps unit tests

* fix: typo

* do not import from data-context in frontend test

* remove non-type import

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
Co-authored-by: Alejandro Estrada <estrada9166@gmail.com>
Co-authored-by: ElevateBart <ledouxb@gmail.com>
2022-02-02 10:42:30 +10:00

1.2 KiB

Migration Component Testing Defaults

A component tesing project without e2e, and all defaults for CT. We rename their specs for them in step 1, then we ask them to move them in step 2.

The following migration steps will be used during this migration:

Steps:

  • automatic file rename
  • manual file rename
  • rename support
  • update config file
  • setup component testing

Automatic Migration

We rename the component specs, since they are using the default testFiles pattern.

Unless the user skips this step, after this step, the filesystem will be:

Before After
component/button.spec.js component/button.cy.js
component/input-spec.tsx component/input-spec.tsx

Manual Files

The user will need to rename and/or move their only component specs, button.cy.js and input.cy.tsx, to their new location. These were renamed in the previous step.

As long as these files are moved from their current location, this step is considered complete. We do not verify where it went.

Rename supportFile

Not used. We do not do anything for supportFile in a component testing project.

Update Config

The expected output is in expected-cypress.config.js.