nx/packages/react/generators.json
Caleb Ukle 8154191eb1
feat(testing): Cypress 10 and component testing support (#9201)
* feat(testing): add generator to aid in the migration to cypress 10

cypress 10 introduces a new configuration format and new layout that requires update settings and
files for e2e projects

* feat(testing): cypress component tests for react/next

initial work for cypress component tests for react and next

* feat(testing): add support for v10 e2e cypress projects

create the correct files for cypress projects >v10 and reorganize tests based on version to allow
easier parsing of tests

* feat(testing): add utils for modifying cypress v10 config

provide ts transformers to take in an existing cypress config and update/add properties within the
given configuration

* fix(testing): fix tests affected by the cypress v10 changes

update tests to assert the correct files/folders/file contents due to the cypress changes in v10

* cleanup(testing): move cypress component testing plugins into the respective packages

move the plugins into out of cypress plugins into the specific vertical plugin to prevent issues
with circular refs

* cleanup(testing): bump cypress version

bump to latest cypress v10 release

* docs(testing): update docs for cypress 10

update cypress docs to include info about component testing and migration to cypress v10

* fix(repo): revert cypress version bump

keep v9 of cypress installed for nx repo until v10 release

* fix(testing): update cypress gen tsconfig and infer targets with converter

* fix(testing): make sure tests use the cypress v10 (for the intermediate)

* fix(testing): update target name after feedback

* fix(testing): support multiple target w/custom configs for cypress v10 migration

* fix(testing): refactor cy component tests into seperate verticals

* feat(testing): create storybook cypress preset

* fix(testing): clean up cy v10 migration

* fix(testing): don't branch for cypress executor testingType

* fix(testing): move cy comp test generator to next

* fix(testing): bump cypress deps

* fix(testing): clean up cy component testing generators

* fix(testing): update cy component testing docs

* fix(testign): dep check. runtime plugin pulls from @nrwl/react

* fix(testing): move e2e into verticals

* fix(testing): address PR feedback

* fix(testing): clean up unit tests

* feat(angular): support migrating angular cli workspaces using cypress v10

* chore(testing): update e2e tests

* fix(testing): address pr feedback

* chore(testing): remove cypress component testing for next.js

* fix(testing): address pr feedback

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2022-07-08 14:34:00 -05:00

196 lines
7.0 KiB
JSON

{
"name": "Nx React",
"version": "0.1",
"extends": ["@nrwl/workspace"],
"schematics": {
"init": {
"factory": "./src/generators/init/init#reactInitSchematic",
"schema": "./src/generators/init/schema.json",
"description": "Initialize the `@nrwl/react` plugin.",
"aliases": ["ng-add"],
"hidden": true
},
"application": {
"factory": "./src/generators/application/application#applicationSchematic",
"schema": "./src/generators/application/schema.json",
"aliases": ["app"],
"x-type": "application",
"description": "Create a React application."
},
"library": {
"factory": "./src/generators/library/library#librarySchematic",
"schema": "./src/generators/library/schema.json",
"aliases": ["lib"],
"x-type": "library",
"description": "Create a React library."
},
"component": {
"factory": "./src/generators/component/component#componentSchematic",
"schema": "./src/generators/component/schema.json",
"description": "Create a React component.",
"aliases": ["c"]
},
"redux": {
"factory": "./src/generators/redux/redux#reduxSchematic",
"schema": "./src/generators/redux/schema.json",
"description": "Create a Redux slice for a project.",
"aliases": ["slice"]
},
"storybook-configuration": {
"factory": "./src/generators/storybook-configuration/configuration#storybookConfigurationSchematic",
"schema": "./src/generators/storybook-configuration/schema.json",
"description": "Set up storybook for a React app or library",
"hidden": false
},
"component-story": {
"factory": "./src/generators/component-story/component-story#componentStorySchematic",
"schema": "./src/generators/component-story/schema.json",
"description": "Generate storybook story for a React component",
"hidden": false
},
"stories": {
"factory": "./src/generators/stories/stories#storiesSchematic",
"schema": "./src/generators/stories/schema.json",
"description": "Create stories/specs for all components declared in an app or library",
"hidden": false
},
"component-cypress-spec": {
"factory": "./src/generators/component-cypress-spec/component-cypress-spec#componentCypressSchematic",
"schema": "./src/generators/component-cypress-spec/schema.json",
"description": "Create a Cypress spec for a UI component that has a story",
"hidden": false
},
"hook": {
"factory": "./src/generators/hook/hook#hookSchematic",
"schema": "./src/generators/hook/schema.json",
"description": "Create a hook.",
"aliases": ["h"]
},
"cypress-component-configuration": {
"factory": "./src/generators/cypress-component-configuration/cypress-component-configuration#cypressComponentConfigGenerator",
"schema": "./src/generators/cypress-component-configuration/schema.json",
"description": "Setup Cypress component testing for a React project",
"hidden": false
},
"component-test": {
"factory": "./src/generators/component-test/component-test#componentTestGenerator",
"schema": "./src/generators/component-test/schema.json",
"description": "Generate a Cypress component test for a React component",
"hidden": false
}
},
"generators": {
"init": {
"factory": "./src/generators/init/init#reactInitGenerator",
"schema": "./src/generators/init/schema.json",
"description": "Initialize the `@nrwl/react` plugin.",
"aliases": ["ng-add"],
"hidden": true
},
"application": {
"factory": "./src/generators/application/application#applicationGenerator",
"schema": "./src/generators/application/schema.json",
"aliases": ["app"],
"x-type": "application",
"description": "Create a React application."
},
"library": {
"factory": "./src/generators/library/library#libraryGenerator",
"schema": "./src/generators/library/schema.json",
"aliases": ["lib"],
"x-type": "library",
"description": "Create a React library."
},
"component": {
"factory": "./src/generators/component/component#componentGenerator",
"schema": "./src/generators/component/schema.json",
"description": "Create a React component.",
"aliases": ["c"]
},
"redux": {
"factory": "./src/generators/redux/redux#reduxGenerator",
"schema": "./src/generators/redux/schema.json",
"description": "Create a Redux slice for a project.",
"aliases": ["slice"]
},
"storybook-configuration": {
"factory": "./src/generators/storybook-configuration/configuration#storybookConfigurationGenerator",
"schema": "./src/generators/storybook-configuration/schema.json",
"description": "Set up storybook for a React app or library.",
"hidden": false
},
"component-story": {
"factory": "./src/generators/component-story/component-story#componentStoryGenerator",
"schema": "./src/generators/component-story/schema.json",
"description": "Generate storybook story for a React component",
"hidden": false
},
"stories": {
"factory": "./src/generators/stories/stories#storiesGenerator",
"schema": "./src/generators/stories/schema.json",
"description": "Create stories/specs for all components declared in an app or library.",
"hidden": false
},
"component-cypress-spec": {
"factory": "./src/generators/component-cypress-spec/component-cypress-spec#componentCypressGenerator",
"schema": "./src/generators/component-cypress-spec/schema.json",
"description": "Create a Cypress spec for a UI component that has a story.",
"hidden": false
},
"hook": {
"factory": "./src/generators/hook/hook#hookGenerator",
"schema": "./src/generators/hook/schema.json",
"description": "Create a hook.",
"aliases": ["c"]
},
"host": {
"factory": "./src/generators/host/host#hostGenerator",
"schema": "./src/generators/host/schema.json",
"x-type": "application",
"description": "Generate a host react application"
},
"remote": {
"factory": "./src/generators/remote/remote#remoteGenerator",
"schema": "./src/generators/remote/schema.json",
"x-type": "application",
"description": "Generate a remote react application"
},
"cypress-component-configuration": {
"factory": "./src/generators/cypress-component-configuration/cypress-component-configuration#cypressComponentConfigGenerator",
"schema": "./src/generators/cypress-component-configuration/schema.json",
"description": "Setup Cypress component testing for a React project",
"hidden": false
},
"component-test": {
"factory": "./src/generators/component-test/component-test#componentTestGenerator",
"schema": "./src/generators/component-test/schema.json",
"description": "Generate a Cypress component test for a React component",
"hidden": false
}
}
}