-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@cypress/react): Make correct plugins for different adapters/bun…
…dlers (#15337) * Remove unused stuff * Fix eslint errors * Use local cypress running script * Fix dependency resolution * Revert "Fix dependency resolution" This reverts commit 01a70be. * Add @cypress/react CI * Properly resolve @types pacakges * Run tests with mocha * Fix cypress tests * Fix or skip some specs * Add retries to the card-spec.js * Remove jest mocks * Run e2e examples on CI * Fix yarn cache key * Fix e2e examples jobs * Rename cypress-react-unit-test with @cypress/react * Fix circleci.yml * Revert "Fix e2e examples jobs" This reverts commit efcc7c4. * Revert " Rename cypress-react-unit-test with @cypress/react" This reverts commit 4febfcc. * Replce cypress-react-unit-test with @cypress/react * Persist build artifacts * Fix working directory paths circle.yml * Fix more CI * adding yarn.lock files * Make package.json for folder * Remove .npmrc * Update circle.yml * Remove unused files * Copy plugins files to the "dist" folder * Fix links to the github repos * Move init wizard from npm/react/init to npm/wizard * Move init wizard from npm/react/init to npm/wizard * Implement initial vue template * Run wizard tests on CI * Refactor continue: bool to success: bool for better code readability * Fix circleci.yml * Use only absolute paths for tests * Stub process.exit calls * Remove useless comments * Add installation cypress to the wizard logic * More improvements * Include packages/examples/cypress into git * Commit new files * Use packages/example as SST for generated files * Last improvements for wizard * Update packages/server/lib/scaffold.js * Rename wizard to create-cypress-tests * Fix circleci config * Fix snapshot tests * Run all create-cypress-tests on ci * Do not install plugins and scaffold files from kitchensink * Ignore integration/examples folder for packages/example * Run create-cypress-tests-tests on CI * Add copy example cross-platform script * Use copy example script in tests * feat: create-cypress-tests auto-inject config (#9116) * Implement the basic babel code transformation for configs * Add more tests for edge-cases * Add snapshot tests for autogenerated code for each template * Add git status guard * Add git status guard * Fix last test * Fix tests * Revert changes for packages/example * Revert changes for packages/example/tsconfig.json * Prepeare package for the release * Fix inquirer name * v0.0.125 * v0.0.127 * v0.0.128 * v0.0.130 * v0.0.131 * Add more UX features * Add vue-cli template * Make src as default folder for vue-cli template * Revert dev-time changes * Run appveyour windows build * Run full appveyour build * Fix circle.yml * Update plugins * Join paths for windows * Revert example/lib changes * Fix tests * Revert unnecessary changes * Implement dev-server dependency installation * Update npm/create-cypress-tests/README.md * Properly exit process if react tests failed * Fix circleci reporter not found * Update nextjs plugin * react-scripts plugin for dev-server * Implement webpack-file plugin support * v0.0.502 * v0.0.503 * Implement rollup support * Implement babel plugin * Update webpack options * Fix nextjs plugin * Unmount components in beforeEach to prevent side-effects * Rename preprocessor to injectDevServer * Fix next.js example * Fix webpack-options exampel * Reproduce rollup problem * Update create-cypress-tests snapshots * Do not run examples/rollup * Uncomment test * Change paralllelism * Remove useless checks * Update snapshots Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
- Loading branch information
1 parent
c405ee8
commit fc30118
Showing
78 changed files
with
3,051 additions
and
2,465 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ build | |
.publish | ||
_test-output | ||
cypress.zip | ||
.babel-cache | ||
|
||
# from extension | ||
Cached Theme.pak | ||
|
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 |
---|---|---|
|
@@ -1108,7 +1108,7 @@ jobs: | |
|
||
npm-react: | ||
<<: *defaults | ||
parallelism: 9 | ||
parallelism: 8 | ||
steps: | ||
- attach_workspace: | ||
at: ~/ | ||
|
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
exports['babel installation template correctly generates plugins config 1'] = ` | ||
const preprocessor = require('@cypress/react/plugins/babel'); | ||
const injectDevServer = require('@cypress/react/plugins/babel'); | ||
const something = require("something"); | ||
module.exports = (on, config) => { | ||
preprocessor(on, config); | ||
injectDevServer(on, config); | ||
return config; // IMPORTANT to return the config object | ||
}; | ||
` |
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
exports['next.js install template correctly generates plugins config 1'] = ` | ||
const preprocessor = require('@cypress/react/plugins/next'); | ||
const injectDevServer = require('@cypress/react/plugins/next'); | ||
const something = require("something"); | ||
module.exports = (on, config) => { | ||
preprocessor(on, config); | ||
injectDevServer(on, config); | ||
return config; // IMPORTANT to return the config object | ||
}; | ||
` |
4 changes: 2 additions & 2 deletions
4
npm/create-cypress-tests/__snapshots__/react-scripts.test.ts.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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
exports['create-react-app install template correctly generates plugins config 1'] = ` | ||
const preprocessor = require('@cypress/react/plugins/react-scripts'); | ||
const injectDevServer = require('@cypress/react/plugins/react-scripts'); | ||
const something = require("something"); | ||
module.exports = (on, config) => { | ||
preprocessor(on, config); | ||
injectDevServer(on, config); | ||
return config; // IMPORTANT to return the config object | ||
}; | ||
` |
8 changes: 4 additions & 4 deletions
8
npm/create-cypress-tests/__snapshots__/reactWebpackFile.test.ts.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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
exports['webpack-file install template correctly generates plugins config when webpack config path is missing 1'] = ` | ||
const preprocessor = require("@cypress/react/plugins/load-webpack"); | ||
const injectDevServer = require("@cypress/react/plugins/load-webpack"); | ||
const something = require("something"); | ||
module.exports = (on, config) => { | ||
// TODO replace with valid webpack config path | ||
config.env.webpackFilename = './webpack.config.js'; | ||
preprocessor(on, config); | ||
injectDevServer(on, config); | ||
return config; // IMPORTANT to return the config object | ||
}; | ||
` | ||
|
||
exports['webpack-file install template correctly generates plugins config when webpack config path is provided 1'] = ` | ||
const preprocessor = require("@cypress/react/plugins/load-webpack"); | ||
const injectDevServer = require("@cypress/react/plugins/load-webpack"); | ||
const something = require("something"); | ||
module.exports = (on, config) => { | ||
config.env.webpackFilename = 'config/webpack.config.js'; | ||
preprocessor(on, config); | ||
injectDevServer(on, config); | ||
return config; // IMPORTANT to return the config object | ||
}; | ||
` |
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 |
---|---|---|
@@ -1,32 +1,40 @@ | ||
exports['rollup-file install template correctly generates plugins config when webpack config path is missing 1'] = ` | ||
const rollupPreprocessor = require("@bahmutov/cy-rollup"); | ||
const path = require("path"); | ||
const { | ||
startDevServer | ||
} = require("@cypress/rollup-dev-server"); | ||
const something = require("something"); | ||
module.exports = (on, config) => { | ||
on('file:preprocessor', rollupPreprocessor({ | ||
// TODO replace with valid rollup config path | ||
configFile: 'rollup.config.js' | ||
})); | ||
require('@cypress/code-coverage/task')(on, config); | ||
on("dev-server:start", async options => { | ||
return startDevServer({ | ||
options, | ||
// TODO replace with valid rollup config path | ||
rollupConfig: path.resolve(__dirname, 'rollup.config.js') | ||
}); | ||
}); | ||
return config; // IMPORTANT to return the config object | ||
}; | ||
` | ||
|
||
exports['rollup-file install template correctly generates plugins config when webpack config path is provided 1'] = ` | ||
const rollupPreprocessor = require("@bahmutov/cy-rollup"); | ||
const path = require("path"); | ||
const { | ||
startDevServer | ||
} = require("@cypress/rollup-dev-server"); | ||
const something = require("something"); | ||
module.exports = (on, config) => { | ||
on('file:preprocessor', rollupPreprocessor({ | ||
configFile: 'config/rollup.config.js' | ||
})); | ||
require('@cypress/code-coverage/task')(on, config); | ||
on("dev-server:start", async options => { | ||
return startDevServer({ | ||
options, | ||
rollupConfig: path.resolve(__dirname, 'config/rollup.config.js') | ||
}); | ||
}); | ||
return config; // IMPORTANT to return the config object | ||
}; | ||
` |
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
fc30118
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.
Circle has built the
linux x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
fc30118
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.
AppVeyor has built the
win32 x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
fc30118
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.
AppVeyor has built the
win32 ia32
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
fc30118
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.
Circle has built the
darwin x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally: