Skip to content

Commit

Permalink
feat(storybook): remove cypress options for e2e testing (#27850)
Browse files Browse the repository at this point in the history
- feat(storybook): remove cypress options from configuration generator
- feat(react): remove cypress options from storybook-configuration
- feat(react): remove cypress options from stories generator
- feat(react): remove component-cypress-spec generator
- chore(storybook): restore @nx/cypress dep
- feat(remix): remove cypress options from storybook
- feat(angular): remove cypress options from storybook-configuration
- feat(angular): remove cypress options from stories generator
- feat(angular): remove component-cypress-spec generator
- feat(vue): remove cypress options from stories generator

<!-- 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 -->
With Storybook Interaction Testing, there's no longer a need to setup
Cypress to specifically test storybook instances


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Remove cypress options for creating an e2e project specifically for
testing storybook instances.

Use Storybook Interaction Testing instead

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
  • Loading branch information
Coly010 authored Sep 24, 2024
1 parent 72cd1c1 commit 8290969
Show file tree
Hide file tree
Showing 61 changed files with 8 additions and 1,475 deletions.
16 changes: 0 additions & 16 deletions docs/generated/manifests/menus.json
Original file line number Diff line number Diff line change
Expand Up @@ -7028,14 +7028,6 @@
"isExternal": false,
"disableCollapsible": false
},
{
"id": "component-cypress-spec",
"path": "/nx-api/angular/generators/component-cypress-spec",
"name": "component-cypress-spec",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "component-story",
"path": "/nx-api/angular/generators/component-story",
Expand Down Expand Up @@ -9222,14 +9214,6 @@
"isExternal": false,
"disableCollapsible": false
},
{
"id": "component-cypress-spec",
"path": "/nx-api/react/generators/component-cypress-spec",
"name": "component-cypress-spec",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "hook",
"path": "/nx-api/react/generators/hook",
Expand Down
18 changes: 0 additions & 18 deletions docs/generated/manifests/nx-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,6 @@
"path": "/nx-api/angular/generators/component",
"type": "generator"
},
"/nx-api/angular/generators/component-cypress-spec": {
"description": "Creates a Cypress spec for a UI component that has a story.",
"file": "generated/packages/angular/generators/component-cypress-spec.json",
"hidden": true,
"name": "component-cypress-spec",
"originalFilePath": "/packages/angular/src/generators/component-cypress-spec/schema.json",
"path": "/nx-api/angular/generators/component-cypress-spec",
"type": "generator"
},
"/nx-api/angular/generators/component-story": {
"description": "Creates a stories.ts file for a component.",
"file": "generated/packages/angular/generators/component-story.json",
Expand Down Expand Up @@ -2358,15 +2349,6 @@
"path": "/nx-api/react/generators/stories",
"type": "generator"
},
"/nx-api/react/generators/component-cypress-spec": {
"description": "Create a Cypress spec for a UI component that has a story.",
"file": "generated/packages/react/generators/component-cypress-spec.json",
"hidden": false,
"name": "component-cypress-spec",
"originalFilePath": "/packages/react/src/generators/component-cypress-spec/schema.json",
"path": "/nx-api/react/generators/component-cypress-spec",
"type": "generator"
},
"/nx-api/react/generators/hook": {
"description": "Create a hook.",
"file": "generated/packages/react/generators/hook.json",
Expand Down
18 changes: 0 additions & 18 deletions docs/generated/packages-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,6 @@
"path": "angular/generators/component",
"type": "generator"
},
{
"description": "Creates a Cypress spec for a UI component that has a story.",
"file": "generated/packages/angular/generators/component-cypress-spec.json",
"hidden": true,
"name": "component-cypress-spec",
"originalFilePath": "/packages/angular/src/generators/component-cypress-spec/schema.json",
"path": "angular/generators/component-cypress-spec",
"type": "generator"
},
{
"description": "Creates a stories.ts file for a component.",
"file": "generated/packages/angular/generators/component-story.json",
Expand Down Expand Up @@ -2332,15 +2323,6 @@
"path": "react/generators/stories",
"type": "generator"
},
{
"description": "Create a Cypress spec for a UI component that has a story.",
"file": "generated/packages/react/generators/component-cypress-spec.json",
"hidden": false,
"name": "component-cypress-spec",
"originalFilePath": "/packages/react/src/generators/component-cypress-spec/schema.json",
"path": "react/generators/component-cypress-spec",
"type": "generator"
},
{
"description": "Create a hook.",
"file": "generated/packages/react/generators/hook.json",
Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions docs/generated/packages/angular/generators/stories.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@
"x-priority": "important",
"default": true
},
"generateCypressSpecs": {
"type": "boolean",
"description": "Specifies whether to automatically generate `*.spec.ts` files in the Cypress e2e app generated by the `cypress-configure` generator.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"cypressProject": {
"type": "string",
"description": "The Cypress project to generate the stories under. This is inferred from `name` by default.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"skipFormat": {
"description": "Skip formatting files.",
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,20 @@
"x-priority": "important",
"default": true
},
"configureCypress": {
"type": "boolean",
"description": "Specifies whether to configure Cypress or not.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"generateStories": {
"type": "boolean",
"description": "Specifies whether to automatically generate `*.stories.ts` files for components declared in this project or not.",
"x-prompt": "Automatically generate *.stories.ts files for components declared in this project?",
"default": true,
"x-priority": "important"
},
"generateCypressSpecs": {
"type": "boolean",
"description": "Specifies whether to automatically generate test files in the generated Cypress e2e app.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"configureStaticServe": {
"type": "boolean",
"description": "Specifies whether to configure a static file server target for serving storybook. Helpful for speeding up CI build/test times.",
"x-prompt": "Configure a static file server for the storybook instance?",
"default": true,
"x-priority": "important"
},
"cypressDirectory": {
"type": "string",
"description": "A directory where the Cypress project will be placed. Placed at the root by default.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"linter": {
"description": "The tool to use for running lint checks.",
"type": "string",
Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions docs/generated/packages/react/generators/stories.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@
"x-prompt": "For which project do you want to generate stories?",
"x-priority": "important"
},
"generateCypressSpecs": {
"type": "boolean",
"description": "Automatically generate `*.spec.ts` files in the cypress e2e app generated by the cypress-configure generator.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"cypressProject": {
"type": "string",
"description": "The Cypress project to generate the stories under. This is inferred from `project` by default.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"interactionTests": {
"type": "boolean",
"description": "Set up Storybook interaction tests.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,20 @@
"alias": ["configureTestRunner"],
"default": true
},
"configureCypress": {
"type": "boolean",
"description": "Run the cypress-configure generator.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"generateStories": {
"type": "boolean",
"description": "Automatically generate `*.stories.ts` files for components declared in this project?",
"x-prompt": "Automatically generate *.stories.ts files for components declared in this project?",
"default": true,
"x-priority": "important"
},
"generateCypressSpecs": {
"type": "boolean",
"description": "Automatically generate test files in the Cypress E2E app generated by the `cypress-configure` generator.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"configureStaticServe": {
"type": "boolean",
"description": "Specifies whether to configure a static file server target for serving storybook. Helpful for speeding up CI build/test times.",
"x-prompt": "Configure a static file server for the storybook instance?",
"default": true,
"x-priority": "important"
},
"cypressDirectory": {
"type": "string",
"description": "A directory where the Cypress project will be placed. Placed at the root by default.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"js": {
"type": "boolean",
"description": "Generate JavaScript story files rather than TypeScript story files.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,20 @@
"alias": ["configureTestRunner"],
"default": true
},
"configureCypress": {
"type": "boolean",
"description": "Run the cypress-configure generator.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"generateStories": {
"type": "boolean",
"description": "Automatically generate `*.stories.ts` files for components declared in this project?",
"x-prompt": "Automatically generate *.stories.ts files for components declared in this project?",
"default": true,
"x-priority": "important"
},
"generateCypressSpecs": {
"type": "boolean",
"description": "Automatically generate test files in the Cypress E2E app generated by the `cypress-configure` generator.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"configureStaticServe": {
"type": "boolean",
"description": "Specifies whether to configure a static file server target for serving storybook. Helpful for speeding up CI build/test times.",
"x-prompt": "Configure a static file server for the storybook instance?",
"default": true,
"x-priority": "important"
},
"cypressDirectory": {
"type": "string",
"description": "A directory where the Cypress project will be placed. Placed at the root by default.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"js": {
"type": "boolean",
"description": "Generate JavaScript story files rather than TypeScript story files.",
Expand Down
10 changes: 0 additions & 10 deletions docs/generated/packages/storybook/generators/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@
"alias": ["configureTestRunner"],
"default": true
},
"configureCypress": {
"type": "boolean",
"description": "Run the cypress-configure generator.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"cypressDirectory": {
"type": "string",
"description": "A directory where the Cypress project will be placed. Added at root by default.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"linter": {
"description": "The tool to use for running lint checks.",
"type": "string",
Expand Down
10 changes: 0 additions & 10 deletions docs/generated/packages/vue/generators/stories.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@
"x-prompt": "For which project do you want to generate stories?",
"x-priority": "important"
},
"generateCypressSpecs": {
"type": "boolean",
"description": "Automatically generate `*.spec.ts` files in the cypress e2e app generated by the cypress-configure generator.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"cypressProject": {
"type": "string",
"description": "The Cypress project to generate the stories under. This is inferred from `project` by default.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v20."
},
"interactionTests": {
"type": "boolean",
"description": "Set up Storybook interaction tests.",
Expand Down
Loading

0 comments on commit 8290969

Please sign in to comment.