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

Commit

Permalink
docs: add Testing section to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammer5 committed Oct 25, 2019
1 parent 24f18d3 commit 8594159
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,29 @@

**[Online docs and demos (latest master
build)](https://d2-ci.github.io/ui-widgets/)**

## Testing

Testing is done with cypress & cucumber.

* 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: `*.stories.testing.js`
These stories will not be used when generating the docs storybook and can
contain more sophisticated scenarios for testing.

0 comments on commit 8594159

Please sign in to comment.