maestra testcases
This commit is contained in:
84
docs/research/maestro-test-run-instructions.md
Normal file
84
docs/research/maestro-test-run-instructions.md
Normal file
@@ -0,0 +1,84 @@
|
||||
# How to Run Maestro Integration Tests
|
||||
|
||||
## Credentials
|
||||
|
||||
| Flow | Credentials |
|
||||
|------|-------------|
|
||||
| **Client login** | legendary@krowd.com / Demo2026! |
|
||||
| **Staff login** | 5557654321 / OTP 123456 |
|
||||
| **Client signup** | Env vars: `MAESTRO_CLIENT_EMAIL`, `MAESTRO_CLIENT_PASSWORD`, `MAESTRO_CLIENT_COMPANY` |
|
||||
| **Staff signup** | Env var: `MAESTRO_STAFF_SIGNUP_PHONE` (must be new Firebase test phone) |
|
||||
|
||||
---
|
||||
|
||||
## Step-by-step: Run login tests
|
||||
|
||||
### 1. Install Maestro CLI
|
||||
|
||||
```bash
|
||||
curl -Ls "https://get.maestro.mobile.dev" | bash
|
||||
```
|
||||
|
||||
Or: https://maestro.dev/docs/getting-started/installation
|
||||
|
||||
### 2. Add Firebase test phone (Staff app only)
|
||||
|
||||
In [Firebase Console](https://console.firebase.google.com) → your project → **Authentication** → **Sign-in method** → **Phone** → **Phone numbers for testing**:
|
||||
|
||||
- Add: **+1 5557654321** with verification code **123456**
|
||||
|
||||
### 3. Build and install the apps
|
||||
|
||||
From the **project root**:
|
||||
|
||||
```bash
|
||||
# Client
|
||||
make mobile-client-build PLATFORM=apk MODE=debug
|
||||
adb install apps/mobile/apps/client/build/app/outputs/flutter-apk/app-debug.apk
|
||||
|
||||
# Staff
|
||||
make mobile-staff-build PLATFORM=apk MODE=debug
|
||||
adb install apps/mobile/apps/staff/build/app/outputs/flutter-apk/app-debug.apk
|
||||
```
|
||||
|
||||
Or run the app on a connected device/emulator: `make mobile-client-dev-android DEVICE=<id>` (then Maestro can launch the already-installed app by appId).
|
||||
|
||||
### 4. Run Maestro tests
|
||||
|
||||
From the **project root** (`e:\Krow-google\krow-workforce`):
|
||||
|
||||
```bash
|
||||
# Client login (uses legendary@krowd.com / Demo2026!)
|
||||
maestro test apps/mobile/apps/client/maestro/login.yaml
|
||||
|
||||
# Staff login (uses 5557654321 / OTP 123456)
|
||||
maestro test apps/mobile/apps/staff/maestro/login.yaml
|
||||
```
|
||||
|
||||
### 5. Run signup tests (optional)
|
||||
|
||||
**Client signup** — set env vars first:
|
||||
```bash
|
||||
$env:MAESTRO_CLIENT_EMAIL="newuser@example.com"
|
||||
$env:MAESTRO_CLIENT_PASSWORD="YourPassword123!"
|
||||
$env:MAESTRO_CLIENT_COMPANY="Test Company"
|
||||
maestro test apps/mobile/apps/client/maestro/signup.yaml
|
||||
```
|
||||
|
||||
**Staff signup** — use a new Firebase test phone:
|
||||
```bash
|
||||
# Add +1 555-555-0000 / 123456 in Firebase, then:
|
||||
$env:MAESTRO_STAFF_SIGNUP_PHONE="5555550000"
|
||||
maestro test apps/mobile/apps/staff/maestro/signup.yaml
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] Maestro CLI installed
|
||||
- [ ] Firebase test phone +1 5557654321 / 123456 added (for staff)
|
||||
- [ ] Client app built and installed
|
||||
- [ ] Staff app built and installed
|
||||
- [ ] Run from project root: `maestro test apps/mobile/apps/client/maestro/login.yaml`
|
||||
- [ ] Run from project root: `maestro test apps/mobile/apps/staff/maestro/login.yaml`
|
||||
Reference in New Issue
Block a user