Automated testing for OpenStax Labs
Testing requires access to git, NPM, and (for simple testing) Docker.
git clone https://github.com/gregfitch/oslabs-test
cd oslabs-test
npx playwright install-deps
(may be skipped if running Chromium and/or Firefox on Linux; required for Webkit)
npm run coverage
(may be skipped)
npm run test
Run against another instance set (expected options: dev
, qa
, staging
, prod
)
INSTANCE=qa npm run test
Run against a specific Accounts, Kinetic, or Website URL
ACCOUNTS_BASE_URL=https://accounts-temp-instance.openstax.org npm run test
KINETIC_BASE_URL=https://temp-instance.kinetic.openstax.org npm run test
WEB_BASE_URL=https://temp-instance.openstax.org npm run test
The tests may also be run through Docker (note: by default it runs things through the Dev instance)
docker build . -t <tag_name>
docker run --rm <tag_name>