Skip to content

Latest commit

 

History

History
66 lines (51 loc) · 1.23 KB

TESTING.md

File metadata and controls

66 lines (51 loc) · 1.23 KB

Testing

We use Cypress for testing.

Update an environment config file to test against:

cp config/alpha.json public/config.json

Run All Tests

npm test

Local Test Development

Create a .local.env with the following

HOST=local.broadinstitute.org
HTTPS=true
SSL_CRT_FILE=server.crt
SSL_KEY_FILE=server.key

Update baseUrl in cypress.config.js and url in cypress/support/commands.js to

https://local.broadinstitute.org:3000

Set env to local in config.json

Start a local server:

npm start

Generate configs locally

./scripts/render-accounts.sh

Open Cypress' interactive view:

    npm run cypress:open

Run Cypress headless:

    npm run cypress:run

Component Testing

See https://www.cypress.io/blog/2021/04/06/introducing-the-cypress-component-test-runner/ for more detailed information

This command opens a browser window with component tests visible. You don't need to have a running server started, this will do that for you. (Note that specifying any port with open-ct will default to 3000, this seems to be a cypress bug)

    npx cypress open

This runs component tests headless:

    npx cypress run --component