Skip to content

Commit

Permalink
add link to component testing example, closes cypress-io#352
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed May 3, 2021
1 parent 6af1967 commit 1788381
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- Set Cypress [config values](#config)
- Use specific [config file](#config-file)
- Run tests in [parallel](#parallel)
- Run E2E and [Component tests](#component-tests)
- [Build app](#build-app) before running the tests
- [Start server](#start-server) before running the tests
- [Start multiple servers](#start-multiple-servers) before running the tests
Expand Down Expand Up @@ -504,6 +505,25 @@ jobs:

The Cypress GH Action does not spawn or create any additional containers - it only links the multiple containers spawned using the matrix strategy into a single logical Dashboard run and into splitting the specs amongst the machines. See the [Cypress parallelization](https://on.cypress.io/parallelization) guide for the explanation.

### Component tests

You can run the [Cypress component tests](https://on.cypress.io/component-testing) after running E2E tests by calling the action again with a custom command:

```yml
- name: Run E2E tests 🧪
uses: cypress-io/github-action@v2
- name: Run Component tests 🧪
uses: cypress-io/github-action@v2
with:
# we have already installed everything
install: false
# to run component tests we need to use "cypress run-ct"
command: yarn cypress run-ct
```

See the example project [cypress-react-component-example](https://github.com/bahmutov/cypress-react-component-example)

### Build app

You can run a build step before starting tests
Expand Down Expand Up @@ -995,6 +1015,7 @@ Name | Description
[cypress-examples](https://github.com/bahmutov/cypress-examples) | Shows separate install job from parallel test jobs
[cypress-gh-action-split-jobs](https://github.com/bahmutov/cypress-gh-action-split-jobs) | Shows a separate install job with the build step, and another job that runs the tests
[cypress-and-jest-typescript-example](https://github.com/cypress-io/cypress-and-jest-typescript-example) | Run E2E and Jest unit tests in parallel
[cypress-react-component-example](https://github.com/bahmutov/cypress-react-component-example) | Run E2E and component tests using this action
<!-- prettier-ignore-end -->

## Notes
Expand Down

0 comments on commit 1788381

Please sign in to comment.