Skip to content

Commit 7acf98e

Browse files
committed
test(maestro): cover standalone clearState with authored corpus flow
Replace the UNVERIFIED_COMMANDS exemption with an authored clear-state flow exercising default and explicit appIds, plus the regenerated upstream parser fixture proving Maestro compatibility. Live iOS Simulator evidence (iPhone 16, com.apple.mobilesafari): - marker files in the data container, then replay '- clearState' (default) and '- clearState: <appId>' (explicit) via 'replay --maestro'; both replay 1/1, wipe the container, and leave MobileSafari not running (no reopen).
1 parent ea4b179 commit 7acf98e

5 files changed

Lines changed: 55 additions & 7 deletions

File tree

‎packages/maestro/test/conformance/expected-divergence.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,7 @@ export const LAYER2_REFERENCE_ONLY = new Set<string>([
137137

138138
// Supported commands that no corpus flow exercises and are therefore verified by
139139
// other means (or explicitly deferred). Listed so coverage stays honest.
140-
export const UNVERIFIED_COMMANDS = new Set<string>([
141-
// Standalone clearState has no upstream corpus flow; unit tests cover parse,
142-
// canonical projection, runtime dispatch, and daemon projection instead.
143-
// Add an authored/clear-state.yaml flow at the next fixture regeneration.
144-
'clearState',
145-
]);
140+
export const UNVERIFIED_COMMANDS = new Set<string>([]);
146141

147142
// Behavioral deviations that are decisions, not parser-level mismatches. These
148143
// are not tied to a single corpus flow; they are recorded so the support matrix

‎scripts/maestro-conformance/build-manifest.mjs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ const NOTES = {
5454
'Coverage: above, below, leftOf, and rightOf recursively across target, assertion, wait, scroll, and swipe commands.',
5555
'authored/numeric-variable-wait':
5656
'Coverage: waitForAnimationToEnd timeout accepts a ${VAR} token and projects identically through the canonical model.',
57+
'authored/clear-state':
58+
'Coverage: standalone clearState with default and explicit appId (no upstream flow exercises it).',
5759
'invalid/bad-swipe-direction': 'Lenient-guard: unknown SwipeDirection enum value.',
5860
'invalid/unknown-command': 'Lenient-guard: unknown command name (tapOn typo).',
5961
'invalid/malformed-selector': 'Lenient-guard: selector given as a sequence.',
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
appId: com.example.app
2+
---
3+
- clearState
4+
- clearState: another.app

‎scripts/maestro-conformance/corpus/manifest.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,14 @@
464464
"note": "Lenient-guard: unknown field inside a selector map."
465465
}
466466
},
467+
{
468+
"id": "authored/clear-state",
469+
"file": "authored/clear-state.yaml",
470+
"origin": {
471+
"kind": "authored",
472+
"note": "Coverage: standalone clearState with default and explicit appId (no upstream flow exercises it)."
473+
}
474+
},
467475
{
468476
"id": "authored/doubletap",
469477
"file": "authored/doubletap.yaml",

‎scripts/maestro-conformance/fixtures/layer1-parser.json‎

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3219,6 +3219,45 @@
32193219
"message": "Unknown Property: bogusField"
32203220
}
32213221
},
3222+
{
3223+
"id": "authored/clear-state",
3224+
"file": "authored/clear-state.yaml",
3225+
"status": "parsed",
3226+
"commands": [
3227+
{
3228+
"type": "ApplyConfigurationCommand",
3229+
"fields": {
3230+
"config": {
3231+
"appId": "com.example.app",
3232+
"name": null,
3233+
"tags": [],
3234+
"ext": {},
3235+
"onFlowStart": null,
3236+
"onFlowComplete": null,
3237+
"properties": {}
3238+
},
3239+
"label": null,
3240+
"optional": false
3241+
}
3242+
},
3243+
{
3244+
"type": "ClearStateCommand",
3245+
"fields": {
3246+
"appId": "com.example.app",
3247+
"label": null,
3248+
"optional": false
3249+
}
3250+
},
3251+
{
3252+
"type": "ClearStateCommand",
3253+
"fields": {
3254+
"appId": "another.app",
3255+
"label": null,
3256+
"optional": false
3257+
}
3258+
}
3259+
]
3260+
},
32223261
{
32233262
"id": "authored/doubletap",
32243263
"file": "authored/doubletap.yaml",
@@ -4976,5 +5015,5 @@
49765015
]
49775016
}
49785017
],
4979-
"contentHash": "857715bbddad493e6242decf7d8f83a0d7ca2b1d7a1add871fa6b5c544ca29cb"
5018+
"contentHash": "3fab6cb48d4ac7ec2640faa223b86a1dd58439d1e181ce442a76a5f754efc725"
49805019
}

0 commit comments

Comments
 (0)