Repository navigation
Commit be0e48b
committed
test(android): read ANR recovery through the Android capture envelope
PR #2003's Coverage lane failed two cases in `android-dialog-readiness.test.ts` with
"Android app ANR blocked tap: ... Automatic recovery failed."
CI runs the branch merged into `main`, and #1981 landed on `main` after this branch's last
rebase: Android publication now derives covered state from acquisition evidence carried in an
opaque capture envelope, so `readAndroidSnapshotNodes` goes through
`androidSnapshotPublicationInput`. This branch's new readiness test mocked `snapshotAndroid`
with a bare `{ nodes }`, publication threw on the missing evidence, and the ANR recovery's own
catch reported that as "recovery failed" - a fixture defect that reads exactly like broken
recovery.
Rebased onto `origin/main` and built the fake capture with the production constructor
(`makeAndroidSnapshotCapture`), so the fixture cannot drift from what production publishes.
No recovery guarantee is relaxed; two are pinned harder:
- the recovered case now asserts the tap that dismissed the dialog, not the status alone, so a
status reported without the device work behind it fails;
- a new case pins #1832 on the readiness path - a "Close app" covered by a foreground surface is
never tapped, and recovery reports failure so the command fails closed.
Verified red-first by mutation: dropping the occlusion filter in `findCloseAppButton` makes the
new case fail (it taps the covered button and reports recovery).
Gates: `pnpm vitest run src/daemon src/platforms/android` (383 files / 2780 tests), full
`unit-core` (1035 files / 7888 tests), `pnpm format`, `tsc --noEmit`, `pnpm check:affected --run`.1 parent 380d9ba commit be0e48b
2 files changed
Lines changed: 89 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
201 | 213 | | |
202 | 214 | | |
203 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
3 | 10 | | |
4 | 11 | | |
| 12 | + | |
| 13 | + | |
5 | 14 | | |
6 | 15 | | |
7 | | - | |
| 16 | + | |
8 | 17 | | |
9 | 18 | | |
10 | 19 | | |
| |||
26 | 35 | | |
27 | 36 | | |
28 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
29 | 47 | | |
30 | | - | |
| 48 | + | |
31 | 49 | | |
32 | 50 | | |
33 | 51 | | |
| |||
39 | 57 | | |
40 | 58 | | |
41 | 59 | | |
42 | | - | |
| 60 | + | |
43 | 61 | | |
44 | 62 | | |
45 | 63 | | |
46 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
47 | 86 | | |
48 | 87 | | |
49 | 88 | | |
| |||
69 | 108 | | |
70 | 109 | | |
71 | 110 | | |
72 | | - | |
| 111 | + | |
73 | 112 | | |
74 | | - | |
| 113 | + | |
75 | 114 | | |
76 | 115 | | |
77 | 116 | | |
78 | 117 | | |
79 | 118 | | |
80 | 119 | | |
81 | 120 | | |
82 | | - | |
| 121 | + | |
83 | 122 | | |
84 | 123 | | |
85 | 124 | | |
86 | 125 | | |
| 126 | + | |
87 | 127 | | |
88 | 128 | | |
89 | 129 | | |
90 | 130 | | |
91 | 131 | | |
92 | 132 | | |
93 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
94 | 164 | | |
95 | 165 | | |
96 | 166 | | |
| |||
0 commit comments