-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9a79ac
commit f716383
Showing
8 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
system-tests/projects/migration-e2e-custom-test-files-array/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
## Migration E2E Custom testFiles | ||
|
||
An e2e project with a custom testFiles but default integrationFolder. We won't rename the specs, but we will rename `integration` to `e2e`. `testFiles` is an *array* of globs. | ||
|
||
The following migration steps will be used during this migration: | ||
|
||
- [x] automatic file rename | ||
- [ ] manual file rename | ||
- [x] rename support | ||
- [x] update config file | ||
- [ ] setup component testing | ||
|
||
## Automatic Migration | ||
|
||
Unless the user skips this step, after this step, the filesystem will be: | ||
|
||
| Before | After| | ||
|---|---| | ||
| `integration/basic.test.js` | `e2e/basic.test.js` | | ||
| `integration/basic.spec.js` | `e2e/basic.spec.js` | | ||
|
||
## Manual Files | ||
|
||
This step is not used. | ||
|
||
## Rename supportFile | ||
|
||
The project has a default support file, `cypress/support/index.js`. We can rename it for them to `cypress/support/e2e.js`. | ||
|
||
| Before | After| | ||
|---|---| | ||
| `cypress/support/index.js` | `cypress/support/e2e.js` | | ||
|
||
## Update Config | ||
|
||
The expected output is in [`expected-cypress.config.js`](./expected-cypress.config.js). |
6 changes: 6 additions & 0 deletions
6
system-tests/projects/migration-e2e-custom-test-files-array/cypress.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"testFiles": [ | ||
"**/*.test.js", | ||
"**/*.spec.js" | ||
] | ||
} |
Empty file.
Empty file.
Empty file.
Empty file.
12 changes: 12 additions & 0 deletions
12
system-tests/projects/migration-e2e-custom-test-files-array/expected-cypress.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { defineConfig } = require('cypress') | ||
|
||
module.exports = defineConfig({ | ||
e2e: { | ||
// We've imported your old cypress plugins here. | ||
// You may want to clean this up later by importing these. | ||
setupNodeEvents (on, config) { | ||
return require('./cypress/plugins/index.js')(on, config) | ||
}, | ||
specPattern: ['cypress/e2e/**/*.test.js', 'cypress/e2e/**/*.spec.js'], | ||
}, | ||
}) |