|
| 1 | +# AGENTS.md |
| 2 | + |
| 3 | +This file provides guidance to AI agents (Codex/Claude/Cursor/WARP) working in this repository. |
| 4 | + |
| 5 | +## Purpose |
| 6 | + |
| 7 | +Bitkit E2E tests for: |
| 8 | +- **bitkit-android** (native Android app) |
| 9 | +- **bitkit-ios** (native iOS app) |
| 10 | + |
| 11 | +For local work, keep `bitkit-e2e-tests`, `bitkit-android`, and `bitkit-ios` checked out in the same parent directory. |
| 12 | + |
| 13 | +## Key Paths |
| 14 | + |
| 15 | +- `aut/` — built app artifacts used by tests (`bitkit_e2e.apk`, `Bitkit.app`) |
| 16 | +- `artifacts/` — screenshots/videos/logs from test runs |
| 17 | +- `test/specs/` — E2E specs |
| 18 | +- `test/helpers/` — helper utilities (selectors, actions) |
| 19 | +- `wdio.conf.ts` — WebdriverIO/Appium config |
| 20 | + |
| 21 | +## Local Build Helpers |
| 22 | + |
| 23 | +Android (builds from `../bitkit-android`, copies APK to `./aut/bitkit_e2e.apk`): |
| 24 | + |
| 25 | +```bash |
| 26 | +./scripts/build-android-apk.sh |
| 27 | + |
| 28 | +# backend selection (local is default) |
| 29 | +BACKEND=regtest ./scripts/build-android-apk.sh |
| 30 | +``` |
| 31 | + |
| 32 | +iOS (builds from `../bitkit-ios`, copies app to `./aut/Bitkit.app`): |
| 33 | + |
| 34 | +```bash |
| 35 | +./scripts/build-ios-sim.sh |
| 36 | + |
| 37 | +# backend selection (local is default) |
| 38 | +BACKEND=regtest ./scripts/build-ios-sim.sh |
| 39 | +``` |
| 40 | + |
| 41 | +Notes: |
| 42 | +- `BACKEND=local` uses local Electrum (default). |
| 43 | +- `BACKEND=regtest` sets network Electrum against regtest. |
| 44 | + |
| 45 | +## Running Tests |
| 46 | + |
| 47 | +```bash |
| 48 | +# Android |
| 49 | +npm run e2e:android |
| 50 | + |
| 51 | +# iOS |
| 52 | +npm run e2e:ios |
| 53 | +``` |
| 54 | + |
| 55 | +Run a single spec: |
| 56 | + |
| 57 | +```bash |
| 58 | +npm run e2e:android -- --spec ./test/specs/onboarding.e2e.ts |
| 59 | +``` |
| 60 | + |
| 61 | +Run by tag: |
| 62 | + |
| 63 | +```bash |
| 64 | +npm run e2e:android -- --mochaOpts.grep "@backup" |
| 65 | +``` |
| 66 | + |
| 67 | +## CI Helper Scripts |
| 68 | + |
| 69 | +These wrap the `npm run e2e:*` commands and capture logs/artifacts: |
| 70 | + |
| 71 | +```bash |
| 72 | +./ci_run_android.sh |
| 73 | +./ci_run_ios.sh |
| 74 | +``` |
| 75 | + |
| 76 | +## Practical Tips |
| 77 | + |
| 78 | +- The tests expect built artifacts in `./aut`. |
| 79 | +- Use `ciIt()` in specs (not `it()`) to enable CI retry-skipping behavior. |
| 80 | +- Keep Android/iOS platform differences behind helpers in `test/helpers/`. |
0 commit comments