This project is a playground to practice e2e tests.
The OrangeHRM demo project was chosen since it provides guest user pages, admin panel and allows to use API request to setup necessary test environment.
Test Report is deployed to GH pages.
Node.js v.18.17.0 +
npm 9.6.0 +
- Clone a project locally and switch to the project directory:
git clone git@github.com:elfro/e2e-playground.git && cd e2e-playground
- Install packages:
npm ci
- Install browsers
npx playwright install
- Copy .env.example file to the root of the project with .env file name.
cp .env.example .env
- Set
USERNAME
andPASSWORD
values by copying them from the main auth page of OrangeHRM app.
- Run tests:
npm run test
or in UI mode:
npm run test:pw-ui
- View Test Report:
npm run allure:open
- Programming language:
- Test library:
- Test Reporter:
- To generate test data:
- To check code syntax and style: ,
- CI:
Spec file contains the test itself.
Fixture, Setup files contain the project dependencies that are used to prepare environment for each test.
Component class usually contains all element selectors and methods to interact with those elements inside this component.
Page class consists of Components and may contain a method for page action that requires the work with several components.
Client provides the API with the specific library / service that can be used in the tests.
Helper does general tasks that could be useful in different places. The most common representatives are:
- WebElementHelper: basic Element actions are defined here;
Data Factory generates necessary test data of the specific type.
Type file represents the common object type that can be met in the project, like API response data or the UI data.
Constants, Enum use to represent the single or group of constants.
The following test cases are covered:
-
Filters work properly on Vacancies page
video.webm
video.webm
-
Filters work properly on Candidates page
video.webm
-
The newly applied candidate from Apply Vacancy page appears on the Candidates page.
video.webm