Logic related to scaffolding new projects using launchpad, including detecting component frameworks and bundlers, installing dependencies and creating cypress.config.js
files.
We have integrations for popular code generators like Create React App, Next.js and Vue CLI, and ship a cypress.config.js
that will work out of the box for those templates.
We will also attempt to scaffold a configuration file for projects using React and Vue projects using Vite and Webpack that are not necessarily created using a code generator.
Name | Version | Dev Server | Version | Library | Component Adaptor | Example Project |
---|---|---|---|---|---|---|
Create React App | 5.x | Webpack | 5.x | React 16, 17 | @cypress/react@latest |
[TODO] |
Create React App | 4.x | Webpack | 4.x | React 16, 17 | @cypress/react@latest |
Link |
React | - | Vite | 2.x | React 16, 17 | @cypress/react@latest |
Link |
Vue | - | Vite | 2.x | Vue 3 | @cypress/vue@latest |
Link |
Vue CLI | 4.x | Webpack | 4.x | Vue 2 | @cypress/vue2@latest |
Link |
Vue CLI | 4.x | Webpack | 4.x | Vue 3 | @cypress/vue@latest |
Link |
Vue CLI | 5.x | Webpack | 5.x | Vue 2 | @cypress/vue2@latest |
Covered by other Vue CLI test projects. |
Vue CLI | 5.x | Webpack | 5.x | Vue 3 | @cypress/vue@latest |
Link |
Nuxt.js | 2.x | Webpack | 4.x, 5.x | Vue 2 | @cypress/vue2@latest |
Link |
These should be supported but currently are not configured.
Name | Version | Dev Server | Version | Library | Component Adaptor | Example Project |
---|---|---|---|---|---|---|
Next.js | 11.x, 12.x | Webpack | 4.x, 5.x | React 16, 17 | @cypress/react@latest |
Link |
The process for adding a new library/framework/bundler is as follows:
- Add your framework in
src/frameworks.ts
. - Any new dependencies are declared in
src/constants.ts
. Don't forget to add a description. - Ensure your project has the correct library and bundler detected with a test in
test/unit/detect.spec.ts
. - Add a new project with the correct
cypress.config.js
andpackage.json
to system-tests/projects. It should be<name>-configured
, which is a working example with some specs. Ensure it will run on CI by adding it tocomponent_testing_spec.ts
. - Add another project called
<name>-unconfigured
, which represents the project prior to having Cypress added. This will be used in step 5. - Add a test to
scaffold-component-testing.cy.ts
to ensure your project has the correctcypress.config.js
generated. Use an existing test as a template.