Skip to content

Commit

Permalink
delete cypress usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Sep 30, 2022
1 parent d640195 commit a6095a4
Show file tree
Hide file tree
Showing 27 changed files with 74 additions and 1,757 deletions.
161 changes: 0 additions & 161 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,6 @@ executors:
environment:
NODE_OPTIONS: --max_old_space_size=3076
resource_class: <<parameters.class>>
sb_cypress_8_node_14:
parameters:
class:
description: The Resource class
type: enum
enum: ['small', 'medium', 'medium+', 'large', 'xlarge']
default: 'medium'
working_directory: /tmp/storybook
docker:
# ⚠️ The Cypress docker image is based on Node.js one so be careful when updating it because it can also
# cause an upgrade of Node.js version too. Cypress 8.5 image is based on Node.js 14
- image: cypress/included:8.7.0
environment:
NODE_OPTIONS: --max_old_space_size=3076
resource_class: <<parameters.class>>
sb_playwright:
parameters:
class:
Expand Down Expand Up @@ -184,85 +169,6 @@ jobs:
root: .
paths:
- .verdaccio-cache
e2e-tests-extended:
executor:
class: medium
name: sb_cypress_8_node_14
parallelism: 14
steps:
- when:
condition:
and:
- not:
equal: [main, << pipeline.git.branch >>]
- not:
equal: [next, << pipeline.git.branch >>]
steps:
- ensure-pr-is-labeled-with:
label: 'run e2e extended test suite'
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: running local registry
command: |
cd code
yarn local-registry --port 6001 --open
background: true
- run:
name: Wait for registry
command: |
cd code
yarn wait-on http://localhost:6001
- run:
name: Run E2E (extended) tests
command: |
cd code
yarn test:e2e-framework --clean --all --skip angular --skip angular12 --skip vue3 --skip web_components_typescript --skip cra --skip react
no_output_timeout: 5m
- store_artifacts:
path: /tmp/cypress-record
destination: cypress
e2e-tests-core:
executor:
class: large
name: sb_cypress_8_node_14
parallelism: 8
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Running local registry
command: |
cd code
yarn local-registry --port 6001 --open
background: true
- run:
name: Wait for registry
command: |
cd code
yarn wait-on http://localhost:6001
- run:
name: Run E2E (core) tests
# Do not test CRA here because it's done in PnP part
# TODO: Remove `web_components_typescript` as soon as Lit 2 stable is released
command: |
cd code
yarn test:e2e-framework vue3 angular130 angular13 angular12 web_components_typescript web_components_lit2 react react_legacy_root_api
no_output_timeout: 5m
- run:
name: prep artifacts
when: always
command: zip -r /tmp/storybook-e2e-testing-out.zip /tmp/storybook-e2e-testing
- store_artifacts:
path: /tmp/cypress-record
destination: cypress
- store_artifacts:
path: /tmp/storybook-e2e-testing-out.zip
destination: e2e
# NOTE: this currently tests each story in docs mode, which doesn't make sense any more as stories
# can no longer run in docs mode. Instead we should probably change the test runner to test each
# docs entry if you run it in `VIEW_MODE=docs`
Expand Down Expand Up @@ -325,73 +231,6 @@ jobs:
- store_artifacts:
path: /tmp/sb-bench.tar.gz
destination: sb-bench.tar.gz
e2e-tests-pnp:
executor:
class: medium
name: sb_cypress_8_node_14
working_directory: /tmp/storybook
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Running local registry
command: |
cd code
yarn local-registry --port 6001 --open
background: true
- run:
name: Wait for registry
command: |
cd code
yarn wait-on http://localhost:6001
- run:
name: run e2e tests cra
command: |
cd code
yarn test:e2e-framework --pnp cra
# - run:
# name: run e2e tests vue
# command: yarn test:e2e-framework --pnp sfcVue
- run:
name: prep artifacts
when: always
command: zip -r /tmp/storybook-e2e-testing-out.zip /tmp/storybook-e2e-testing
- store_artifacts:
path: /tmp/cypress-record
destination: cypress
- store_artifacts:
path: /tmp/storybook-e2e-testing-out.zip
destination: e2e
e2e-tests-examples:
executor:
class: small
name: sb_cypress_8_node_14
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: running example
command: |
cd code
yarn serve-storybooks
background: true
- run:
name: await running examples
command: |
cd code
yarn await-serve-storybooks
- run:
name: cypress run
command: |
cd code
yarn test:e2e-examples
- store_artifacts:
path: /tmp/cypress-record
destination: cypress
smoke-tests:
executor:
class: medium+
Expand Down
17 changes: 2 additions & 15 deletions CONTRIBUTING.old.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
- [2a. Run unit tests](#2a-run-unit-tests)
- [Core & Examples Tests](#core--examples-tests)
- [2b. Run Linter](#2b-run-linter)
- [2c. Run Cypress tests](#2c-run-cypress-tests)
- [Reproductions](#reproductions)
- [In the monorepo](#in-the-monorepo)
- [Outside the monorepo](#outside-the-monorepo)
Expand All @@ -32,8 +31,8 @@
- [Verify your local version is working](#verify-your-local-version-is-working)
- [Documentation](#documentation)
- [Release Guide](#release-guide)
- [Prerelease:](#prerelease)
- [Full release:](#full-release)
- [Prerelease:](#prerelease)
- [Full release:](#full-release)

Thanks for your interest in improving Storybook! We are a community-driven project and welcome contributions of all kinds: from discussion to documentation to bugfixes to feature improvements.

Expand Down Expand Up @@ -129,18 +128,6 @@ It can be immensely helpful to get feedback in your editor, if you're using VsCo

This should enable auto-fix for all source files, and give linting warnings and errors within your editor.

### 2c. Run Cypress tests

First make sure the repo is bootstrapped.

Then run `yarn build-storybooks --all`, this creates a static website from all examples.

Then run `yarn serve-storybooks`, this will run the static site on the port cypress expects.

Then run `yarn add cypress -W --optional`. When this has completed cypress should be installed on your system. If it is already on your system, this step can be skipped.

Then run `yarn cypress open` if you want to see the tests run in the UI, or `yarn cypress run` to run the tests headless.

### Reproductions

#### In the monorepo
Expand Down
1 change: 0 additions & 1 deletion code/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ module.exports = {
},
},
{ files: '**/.storybook/config.js', rules: { 'global-require': 'off' } },
{ files: 'cypress/**', rules: { 'jest/expect-expect': 'off' } },
{
files: ['**/*.stories.*'],
rules: {
Expand Down
6 changes: 0 additions & 6 deletions code/cypress/.eslintrc.json

This file was deleted.

5 changes: 0 additions & 5 deletions code/cypress/fixtures/example.json

This file was deleted.

19 changes: 0 additions & 19 deletions code/cypress/generated/addon-action.spec.ts

This file was deleted.

26 changes: 0 additions & 26 deletions code/cypress/generated/addon-backgrounds.spec.ts

This file was deleted.

49 changes: 0 additions & 49 deletions code/cypress/generated/addon-controls.spec.ts

This file was deleted.

30 changes: 0 additions & 30 deletions code/cypress/generated/addon-docs.spec.ts

This file was deleted.

Loading

0 comments on commit a6095a4

Please sign in to comment.