ugent-library / deliver

Apache License 2.0
3 stars 0 forks source link

Prepared local Cypress test environment #110

Closed verheyenkoen closed 8 months ago

verheyenkoen commented 8 months ago

This PR replaces the current e2e test behaviour.

Currently tests can only be run against https://deliver.libtest.ugent.be/. With the addition of devcontainers I switched the default test setup to run against the local dev environment using users "deliver" (space admin role) and "superdeliver" (super admin role).

I also added npm scripts to run Cypress tests against the libtest environment (npm run test:libtest for CLI run and npm run cypress:open:libtest for the Cypress GUI). They will only work if you add a ./cypress/.env file locally.

CYPRESS_BASE_URL=https://deliver.libtest.ugent.be/

CYPRESS_OIDC_ORIGIN=https://test.liblogin.ugent.be

CYPRESS_SPACE_ADMIN_USER_NAME=rcallewa
CYPRESS_SPACE_ADMIN_USER_PASSWORD=<redacted>

CYPRESS_SUPER_ADMIN_USER_NAME=koeverhe
CYPRESS_SUPER_ADMIN_USER_PASSWORD=<redacted>

GitHub Actions environment variables have been prepared for this.