Playwright and Playwright-test were used for the implementation, the tests are run serially, since I had only one account, and the tests are related.
Tests running is set up by GH Actions, the environment variables are set in Secrets
- Clone repo and open containing folder:
git clone https://github.com/Mkots/test-pw.git
cd pw-test
- Install dependencies:
npm ci
- Create localise account on staging server
- Create API token on staging server
- Edit
"test"
script to addenv
variables:
{
"scripts": {
"test": "USER_EMAIL=<[email protected]> USER_PASSWORD=<user password> API_TOKEN=<user API token> playwright test"
}
}
- Run tests:
npm run test