forked from trent_larson/crowd-funder-for-time-pwa
chore: updated package-lock and added a README for the test scripts.
This commit is contained in:
653
package-lock.json
generated
653
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
73
test-scripts/README.md
Normal file
73
test-scripts/README.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# Test Scripts
|
||||
|
||||
This directory contains scripts for testing deep links and DID functionality.
|
||||
|
||||
## Deep Link Testing
|
||||
|
||||
The `run-deeplink-tests.sh` script tests the app's deep link handling capabilities.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
1. Required tools:
|
||||
- bash
|
||||
- curl
|
||||
- jq
|
||||
- adb (optional - for device testing)
|
||||
- Either:
|
||||
- Python 3 with packages: `mnemonic`, `eth_account`, `eth_keys`, `web3`, `requests`
|
||||
- OR Node.js with TypeScript
|
||||
|
||||
### Setup
|
||||
|
||||
1. Generate required test files using either:
|
||||
|
||||
Python method:
|
||||
```bash
|
||||
pip install mnemonic eth_account eth_keys web3 requests
|
||||
python test-scripts/new_flow.py
|
||||
```
|
||||
|
||||
OR TypeScript method:
|
||||
```bash
|
||||
npm install
|
||||
npm run build
|
||||
npm run start
|
||||
```
|
||||
|
||||
2. This will create the `.generated` directory with required files:
|
||||
- `test-env.sh`
|
||||
- `claim_details.json`
|
||||
- `contacts.json`
|
||||
|
||||
### Running Tests
|
||||
|
||||
1. Execute tests:
|
||||
```bash
|
||||
./test-scripts/run-deeplink-tests.sh
|
||||
```
|
||||
|
||||
2. Print mode (no device needed):
|
||||
```bash
|
||||
./test-scripts/run-deeplink-tests.sh -p
|
||||
```
|
||||
|
||||
3. Custom timeout:
|
||||
```bash
|
||||
./test-scripts/run-deeplink-tests.sh -t 10
|
||||
```
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
If you encounter errors:
|
||||
1. Ensure `.generated` directory exists with required files
|
||||
2. Check ADB is installed for device testing
|
||||
3. Run with `-p` flag to verify deep link generation
|
||||
4. Verify test environment variables in `.generated/test-env.sh`
|
||||
|
||||
### Clean Up
|
||||
|
||||
To clean up generated files:
|
||||
```bash
|
||||
rm -rf .generated
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user