From 04fcbec858c13c2714519746ed614108321cf395 Mon Sep 17 00:00:00 2001 From: Jan-Gerke Salomon Date: Wed, 23 Oct 2019 10:35:30 +0800 Subject: [PATCH] chore(testing): update README --- README.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b3469cca9..f8d3f7606 100644 --- a/README.md +++ b/README.md @@ -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`
+ This will run cypress and exit with either 0 or 1 + +* Run `yarn cypress:open`
+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.