Based on Jest.io/TypeScript/TDD.
npm install
- Create
.env
file in theintegration-tests/src/playbook/
package folder and copy paste.env.example
content in there.
cp .env.example packages/integration-tests/src/playbook/.env
- Add your private wallet key to
WALLET_PRIVATE_KEY=
By default we userichWalletPrivateKey
private key inintegration-tests/src/playbook/utils/getWallet.ts
fromintegration-tests/src/entities.ts
.
Make sure you have Docker
installed. Before running the tests you need to spin up a local environment (use docker-compose.yaml
from the root directory):
docker compose up
-- all tests:
npm run integration-test:api
-- all tests:
npm run integration-test:ui
If you need to run the exact test or/and suite you can change
key-words from it
to fit
(for the test) and describe
to fdescribe
for suite.
If you need to exclude some specific test/suites, you can change keywords it
to xit
and/or
describe
to xdescribe
.
The test solution contains two main folders: src and tests. src folder contains:
- essential scenarios
- predefined entities and config config files
- contracts folder with a set of contracts
- deploy folder with a set of deploy scripts
- buffer folder as a temporary storage of transaction hashes and addresses
- utils folder with utils scripts
tests folder contains sets of:
- api endpoints tests, which cover essential part of worker and api functionality
- ui UI tests, which cover essential part of Block explorer functionality