Run all tests other than Cypress in the project using scripts/dev test
.
- Run
scripts/dev test:go
to run all local-only server-side tests. This requires the database to be running first. Usescripts/dev up:backend
to start it. - Run
scripts/dev test:go:only [full package name]
(e.g.scripts/dev test:go:only "github.com/cms-enterprise/mint-app/pkg/cedar/core"
) to run server-side tests for a specific folder. Depending on the tests being run, this may require the database to be running, as above. - Run
scripts/dev test:go:long
to run all server-side tests, including ones that contact external services.
Run scripts/dev test:js
.
There are multiple ways to run the Cypress tests:
- Run
yarn cypress run
to run the tests in the CLI. - To have a more interactive experience, you can instead run
yarn cypress open
.- Windows+WSL users will need some additional setup to run graphical applications from within WSL.
- Option 1: Use the preview features available in Windows Insiders build. See Microsoft docs.
- Option 2: Set up an X server on Windows and configure WSL to use it. See this article for details.
- Note: the database, frontend, and backend must be running prior to starting the Cypress tests. Use
scripts/dev up
to start them. - The
APP_ENV
environment variable should be set totesting
in.envrc.local
. After creating.envrc.local
if necessary and addingAPP_ENV=testing
to it, rundirenv allow
to enable it. (See instructions above ondirenv
usage) - Running
login.spec.js
requires the environment variablesOKTA_TEST_USERNAME
,OKTA_TEST_PASSWORD
, andOKTA_TEST_SECRET
to be set in.envrc.local
. The values can be found in 1Password, as mentioned in the Authentication section.
- Windows+WSL users will need some additional setup to run graphical applications from within WSL.