This repository contains automated tests in Playwright.
├── playwright
| ├── e2e | contains automated tests
| | ├── exampleTest.spec.ts
| ├── fixtures | contains fixtures for XYZ translations
| | ├── exampleFixture.json > fixture for contact forms in a particular language
| ├── plugins
| ├── commands | custome commands for automated tests
| | ├── exampleAssertionsCommands.ts > Custom commands for Solar Calculators assertions
| | ├── exampleFormCommands.ts > Custom commands of test activities in contact forms
| | ├── e2e.ts > file for importing other files with Custom Commands
| | ├── generalCommands.ts > General commands e.g. login
| ├── readme.md * file contains information about the project
| ├── .eslintrc.json > ESLint configuration file
| ├── tsconfig.json > TypeScript configuration file
|
- Copy env.example and rename to .env (by default it contains develop backend local frontend URLS)
- Use command to install dependencies
npm install
-
env.example configuration requires local frontend
- Clone & run repository https://localRepositoryAddress
-
Run some tests in Playwright
npx playwright test
or to use particular number of workers e.g. 4
npx playwright test --workers 4
- Test reports
npx playwright test --reporter=html
npx playwright show-report
To run the code in a Docker image on a pipeline, you need to set the environment variable env to "local". Changing the env variable to "dev" or "stg" will trigger testing using the frontend of the respective selected test environment.
TBD