Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
chore(testing): update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammer5 committed Oct 23, 2019
1 parent bf3bfa8 commit 04fcbec
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions README.md
Expand Up @@ -71,19 +71,27 @@ automatically determine the next version.

## Testing

In order to run the cypress tests:
1. Run `yarn start:test`
(This will start the storybook, including testing stories
and doesn't launch the browser)
2. Run `yarn cypress:open`
Testing is done with cypress & cucumber.

Once the storybook is available, you can run the tests from within
the cypress application that has been launched in step 2.
* Run `yarn cypress:run`<br />
This will run cypress and exit with either 0 or 1

* Run `yarn cypress:open`<br />
This will open the cypress gui, which is useful for writing tests

### Recording videos and taking screenshots

When running `yarn cypress:run`, by default no video is recorded and no
screenshot will be taken.
* Recording videos can be enabled by supplying the
`CYPRESS_VIDEO=true` env var.
* Taking screenshots can be enabled by supplying the
`CYPRESS_SCREENSHOT=true` env var.

### Storybook stories for testing

Sometimes it's required to add stateful stories to test certain behavior.
That's why you can add files with the following file name format: `*.testing.stories.js`
That's why you can add files with the following file name format: `*.stories.testing.js`
These stories will not be used when generating the docs storybook and can
contain more sophisticated scenarios for testing.

Expand Down

0 comments on commit 04fcbec

Please sign in to comment.