<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #27175 #26914 #22941 #26531
54 lines
2.1 KiB
JSON
54 lines
2.1 KiB
JSON
{
|
|
"name": "component-cypress-spec",
|
|
"factory": "./src/generators/component-cypress-spec/component-cypress-spec#componentCypressGenerator",
|
|
"schema": {
|
|
"$schema": "https://json-schema.org/schema",
|
|
"cli": "nx",
|
|
"$id": "NxReactComponentCypressSpec",
|
|
"title": "Create component Cypress spec",
|
|
"description": "Create a Storybook Cypress spec for a UI component that has a story.",
|
|
"x-deprecated": "Use interactionTests instead. This option will be removed in v20.",
|
|
"type": "object",
|
|
"properties": {
|
|
"project": {
|
|
"type": "string",
|
|
"description": "The project name for which to generate tests.",
|
|
"examples": ["shared-ui-component"],
|
|
"$default": { "$source": "projectName", "index": 0 },
|
|
"x-prompt": "What's name of the project for which to generate tests?",
|
|
"x-priority": "important"
|
|
},
|
|
"componentPath": {
|
|
"type": "string",
|
|
"description": "Relative path to the component file from the library root?",
|
|
"examples": ["lib/components"],
|
|
"x-prompt": "What's path of the component relative to the project's lib root for which to generate a test?",
|
|
"x-priority": "important"
|
|
},
|
|
"js": {
|
|
"type": "boolean",
|
|
"description": "Generate JavaScript files rather than TypeScript files.",
|
|
"default": false
|
|
},
|
|
"cypressProject": {
|
|
"type": "string",
|
|
"description": "The Cypress project to generate the stories under. By default, inferred from `project`."
|
|
},
|
|
"skipFormat": {
|
|
"description": "Skip formatting files.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"x-priority": "internal"
|
|
}
|
|
},
|
|
"required": ["project", "componentPath"],
|
|
"presets": []
|
|
},
|
|
"description": "Create a Cypress spec for a UI component that has a story.",
|
|
"hidden": false,
|
|
"implementation": "/packages/react/src/generators/component-cypress-spec/component-cypress-spec#componentCypressGenerator.ts",
|
|
"aliases": [],
|
|
"path": "/packages/react/src/generators/component-cypress-spec/schema.json",
|
|
"type": "generator"
|
|
}
|