How to contribute to UI tests
Introduction
Branches
The first question to ask when making a contribution is “Which branch should I target?”.
The rules are as follows:
- The development branch for UI testing is the current development branch.
- The branch changes as soon as the final release is out.
Differences between scenarios & tests
Scenarios are the base of UI Tests. They are available on the PrestaShop Tests Documentation.
Tests are the code based on scenarios. They are available on the main repository in the tests/UI directory.
Contribute to UI tests
Choose a scenario to automate
This part is only available for PrestaShopCorp employees.
- Go to the PrestaShop Forge
- Access to the Test Repositoy
- Find a test in the directory
Core
orModules
with the state “TO BE AUTOMATED”
Create the PR
- The contributor create a PR targetting the development branch for UI tests.
- The contributor can check that the PR works with the Github Action
ga.tests.ui.pr
.
Review the PR
- The review is done by Software Developers in Tests of the project.
- Some checks are done :
- The PR complies with contribution guidelines;
- The CI is green (lint, typescript check);
- The scenario is followed;
- The test is executed without errors in the nightly;
- The test use the Page Object Model pattern.
Merge of the PR
- The merge is done after two approvals of Software Developers in Tests of the project including a maintainer.
- After that, the contribution will be executed every night in the nightly of the project to ensure continuity and stability of the project.