Skip to content

Commit

Permalink
refactor: update readme and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Romsters authored and pcheremu committed Oct 10, 2023
1 parent c9b2262 commit 0e4b835
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:ci": "lerna run test:ci",
"test:e2e": "lerna run test:e2e",
"test:integration:ui": "lerna run integration-test:ui",
"test:integration:api": "lerna run integration-test:api:pre-seed && lerna run integration-test:api",
"test:integration:api": "lerna run integration-test:api",
"dev": "lerna run dev",
"build": "lerna run build",
"start": "lerna run start",
Expand Down
27 changes: 11 additions & 16 deletions packages/integration-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,33 @@ Based on Jest.io/TypeScript/TDD.
npm install
```

## How to prepare a local environment
## Preparing a local environment

Pre-requisites: Docker Desktop should be installed

Before the test run you need to spin up a local environment (use docker-compose.yaml from the root project):
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):
```bash
docker-compose -f ../../docker-compose.yaml up
docker-compose up
```

## How to run api tests
## Running API tests
--
all tests:

```bash
npm run integration-test:api
```
## How to run ui tests
## Running UI tests
--
all tests:

```bash
npm run integration-test:ui
```

If there is a necessity to run the exact test or/and suite you need change
key-words from "it" to "fit" (for the test) and "describe" to "fdescribe" for suite.
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 want to exclude some test/suites, you need to change keywords "it" to "xit" and/or
"describe" to "xdescribe"
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](./src) and [tests](./tests).
[src](./src) folder contains:
Expand All @@ -48,8 +46,5 @@ The test solution contains two main folders: [src](./src) and [tests](./tests).
- [utils](./src/playbook/utils/) folder with utils scripts

[tests](./tests) folder contains sets of:
- [api](./tests/api/) endpoints tests, that cover an essential part of [worker](../packages/worker/) and [api](../packages/api/) functionality
- [ui](./tests/ui/) UI tests, which cover an essential part of [Block explorer](../packages/app/) functionality


For more details, follow this documentation https://era.zksync.io/docs/.
- [api](./tests/api/) endpoints tests, which cover essential part of [worker](../packages/worker/) and [api](../packages/api/) functionality
- [ui](./tests/ui/) UI tests, which cover essential part of [Block explorer](../packages/app/) functionality
5 changes: 2 additions & 3 deletions packages/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
"license": "MIT",
"scripts": {
"postinstall": "cd src/playbook && npm install",
"integration-test:api:pre-seed": "jest --verbose --testPathPattern=tokens.test.ts && jest --verbose --testPathPattern=deposit.test.ts",
"integration-test:api": "jest --verbose --testPathPattern=common && jest --verbose --testPathPattern=transactions",
"integration-test:api": "jest --verbose --testPathPattern=tokens.test.ts && jest --verbose --testPathPattern=deposit.test.ts && jest --verbose --testPathPattern=common && jest --verbose --testPathPattern=transactions",
"integration-test:ui": "npx playwright test",
"block-explorer:start": "docker-compose -f docker-compose.yaml up\n",
"block-explorer:start": "docker-compose up",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-pattern 'repos' --ignore-pattern 'git add .'"
},
"devDependencies": {
Expand Down

0 comments on commit 0e4b835

Please sign in to comment.