Skip to content

Commit

Permalink
Enabling use of $BRIDGE_E2E_BROWSER_NAME with Cypress
Browse files Browse the repository at this point in the history
Signed-off-by: Hiro Miyamoto <[email protected]>
  • Loading branch information
miyamotoh committed Sep 1, 2020
1 parent 21e2880 commit 0cac9bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,10 @@ yarn run test-cypress
```

This will launch the Cypress test runner where you can run one or all cypress tests.
By default, it will look for Chrome in the system and use it, but if you want to use Firefox instead, set `BRIDGE_E2E_BROWSER_NAME` environment variable in your shell with the value `firefox`.

[**_More information on Console's Cypress usage_**](frontend/packages/integration-tests-cypress/README.md)

#### Protractor

Integration tests are run in a headless browser driven by [protractor](http://www.protractortest.org/#/).
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"test-gui": "yarn run test-suite --suite all",
"test-suite": "ts-node -O '{\"module\":\"commonjs\"}' ./node_modules/.bin/protractor integration-tests/protractor.conf.ts",
"test-cypress": "cd packages/integration-tests-cypress && cypress open --env openshift=true",
"test-cypress-headless": "cd packages/integration-tests-cypress && node --max-old-space-size=4096 ../../node_modules/.bin/cypress run --env openshift=true --browser chrome --headless",
"test-cypress-headless": "cd packages/integration-tests-cypress && node --max-old-space-size=4096 ../../node_modules/.bin/cypress run --env openshift=true --browser ${BRIDGE_E2E_BROWSER_NAME:=chrome} --headless",
"cypress-merge": "mochawesome-merge ./gui_test_screenshots/cypress_report*.json > ./gui_test_screenshots/cypress.json",
"cypress-generate": "marge -o ./gui_test_screenshots/ -f cypress-report -t 'OpenShift Console Cypress Test Results' -p 'OpenShift Cypress Test Results' --showPassed false --assetsDir ./gui_test_screenshots/cypress/assets ./gui_test_screenshots/cypress.json",
"cypress-postreport": "yarn run cypress-merge && yarn run cypress-generate && rm -f ./gui_test_screenshots/cypress*.json",
Expand Down

0 comments on commit 0cac9bf

Please sign in to comment.