forked from trent_larson/crowd-funder-for-time-pwa
remove duplicate instructions
This commit is contained in:
@@ -29,6 +29,14 @@ Tests are organized by feature area and numbered for execution order:
|
||||
## Prerequisites
|
||||
|
||||
1. Endorser server running locally (see TESTING.md for setup)
|
||||
```bash
|
||||
git clone https://github.com/time-endorser/endorser-ch.git
|
||||
cd endorser-ch
|
||||
npm install
|
||||
test/test.sh
|
||||
cp .env.local .env
|
||||
NODE_ENV=test-local npm run dev
|
||||
```
|
||||
2. Playwright browsers installed:
|
||||
```bash
|
||||
npx playwright install
|
||||
@@ -78,9 +86,9 @@ npx playwright test -c playwright.config-local.ts --trace on test-playwright/40-
|
||||
|
||||
## Test Data
|
||||
|
||||
The test suite uses predefined test users, with User #0 having registration privileges:
|
||||
- DID: `did:ethr:0x0000694B58C2cC69658993A90D3840C560f2F51F`
|
||||
- Seed phrase available in TESTING.md
|
||||
The test suite uses predefined test users, with User #0 having registration privileges. To use it: Profile -> Advanced -> Switch Identifier -> Add Another Identity -> You Have A Seed -> Advanced -> Use mnemonic for Test User #0 -> Import
|
||||
|
||||
More details available in TESTING.md
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
||||
@@ -1,69 +1,6 @@
|
||||
# Testing Guide
|
||||
|
||||
## Automated Tests
|
||||
|
||||
### Setup
|
||||
|
||||
1. Clone and set up the Endorser server:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/time-endorser/endorser-ch.git
|
||||
cd endorser-ch
|
||||
npm install
|
||||
test/test.sh
|
||||
cp .env.local .env
|
||||
NODE_ENV=test-local npm run dev
|
||||
```
|
||||
|
||||
If that fails, follow the instructions in the endorser-ch directory's README.md.
|
||||
|
||||
2. Install Playwright browsers:
|
||||
|
||||
```bash
|
||||
npx playwright install
|
||||
```
|
||||
|
||||
### Running Tests
|
||||
|
||||
#### Full Test Suite
|
||||
|
||||
To run all tests, make sure XCode is started and either Android Studio is started or an Android device is connected.
|
||||
|
||||
```bash
|
||||
npm run test:all
|
||||
```
|
||||
|
||||
Run only web tests:
|
||||
|
||||
```bash
|
||||
npm run test:web
|
||||
```
|
||||
|
||||
Note: Tests may occasionally fail and succeed on rerun (especially if a different test fails).
|
||||
|
||||
#### Single Test
|
||||
To run a single test with tracing enabled:
|
||||
|
||||
```bash
|
||||
npx playwright test -c playwright.config-local.ts --trace on test-playwright/40-add-contact.spec.ts
|
||||
```
|
||||
#### Global Test Server
|
||||
It's possible to use the global test Endorser (ledger) server, though not all tests currently succeed:
|
||||
|
||||
```bash
|
||||
VITE_DEFAULT_ENDORSER_API_SERVER=https://test-ledger.time.com npm run dev
|
||||
```
|
||||
|
||||
#### Minimal Test Data
|
||||
To run with minimal test data:
|
||||
|
||||
```bash
|
||||
rm ../endorser-ch-test-local.sqlite3
|
||||
NODE_ENV=test-local npm run flyway migrate
|
||||
NODE_ENV=test-local npm run test test/controller0
|
||||
NODE_ENV=test-local npm run dev
|
||||
```
|
||||
|
||||
Start with [README.md](./README.md). This file has more details.
|
||||
|
||||
## Test User Setup
|
||||
|
||||
|
||||
Reference in New Issue
Block a user