-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add readme.md file for e2e tests
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## E2E Tests | ||
|
||
This directory contains end-to-end tests for the project, utilizing [Playwright](https://playwright.dev) to run tests in Chromium browser. | ||
|
||
### Pre-requisites | ||
- Create [sandbox PayFast](https://sandbox.payfast.co.za/) account which used for test payments. | ||
|
||
### Dependencies for local testing | ||
- Add `.env` file with PayFast credentials in `./tests/e2e/config` directory. | ||
``` | ||
PAYFAST_MERCHANT_ID=******** | ||
PAYFAST_MERCHANT_KEY=******** | ||
PAYFAST_PASSPHRASE=******** | ||
``` | ||
|
||
**Note**: Use `npm run test:e2e-local` to run tests locally. | ||
|
||
### Dependencies for Github testing | ||
- Add bot token to Github, | ||
``` | ||
gh secret set BOT_GITHUB_TOKEN --app actions --repo=woocommerce/woocommerce-gateway-payfast | ||
``` | ||
- Add PayFast credentials to Github. | ||
``` | ||
gh secret set PAYFAST_MERCHANT_ID --app actions --repo=woocommerce/woocommerce-gateway-payfast | ||
gh secret set PAYFAST_MERCHANT_KEY --app actions --repo=woocommerce/woocommerce-gateway-payfast | ||
gh secret set PAYFAST_PASSPHRASE --app actions --repo=woocommerce/woocommerce-gateway-payfast | ||
``` | ||
|
||
**Note**: Add `needs: e2e testing` to pull request to run e2e tests. |