Repository navigation
Commit 6428c54
authored
test(ios-runner): pin production-built runner requests in a golden table TS and Swift both verify (#2900)
* test(apple-runner): pin production-built runner requests in a golden table
Add contracts/fixtures/runner-requests.json: one entry per production
request site, captured at its real entry point. Three producer tests own
the entries: the platform-apple request sites, the runner-internal sites
(real HTTP bodies from the fake runner), and the two recording modules.
runner-contract.test.ts asserts every RunnerCommand has an entry, names
are sorted and unique, and the drive code builds no request itself.
Refs #2881
* test(apple-runner): verify the runner request golden table in Swift
Every fixture request decodes as Command and re-encodes with the same key
set, every CommandType case has a request, and every stored field of
Command, SequenceStep and RunnerGesturePlan appears in some request.
CommandType becomes CaseIterable for the case check.
Refs #2881
* chore(gates): keep runner-requests.json entries on one line each
Refs #2881
* test(apple-runner): pin the macOS desktopScroll pixels request
* test(apple-runner): share the runner-requests fixture check with root tests
Export the fixture reader as @agent-device/platform-apple/runner/requests-fixtures
so root producers pin requests through the same commandId normalization, and derive
the request-literal guard's sources from the producers the fixture declares.
Refs #2881
* test(apple-runner): drive root recording requests from a dedicated golden file
The request-literal guard scans every fixture producer, so root behavior
tests that doubled as producers had to weaken their exact request
assertions. Move the root recording drives into
src/__tests__/screen-recording-runner-requests.test.ts, restore the
original literals, and pin the recordStop sent without an app bundle.
Producers must now be *runner-requests.test.ts files that call
assertProducedRunnerRequests(import.meta.filename, ...), so a comment no
longer satisfies the check. The runner-internal drive moves to
runner/__tests__/runner-requests.test.ts to follow that rule.
Refs #28811 parent 0fb1577 commit 6428c54
15 files changed
Lines changed: 833 additions & 64 deletions
File tree
- apple/runner
- AgentDeviceRunner/AgentDeviceRunnerUITests
- UnitTests
- contracts/fixtures
- packages/platform-apple
- src
- __tests__
- runner
- __tests__
- scripts/layering
- src/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
35 | 145 | | |
36 | 146 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
0 commit comments