Skip to content

Commit eef27de

Browse files
committed
test(skillgym): require ref-driven SpringBoard interaction, not fixed labels
The case required the literal label="Add Widget" while the topic it tests explicitly says SpringBoard labels vary and must come from a fresh snapshot; it also didn't require the Calendar search action, so a plan could pass while skipping the widget-gallery search entirely. Give the contract explicit snapshot-derived refs (@e30/@e31/@e35) and require pressing/filling those refs plus the Calendar search, and forbid hardcoded English labels (Add Widget/Edit/Done) instead. Verified locally against three synthetic finalOutput plans (good, search-skipping, fixed-label) since the real runner needs a live model.
1 parent 701860a commit eef27de

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

test/skillgym/suites/agent-device-smoke-suite.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2596,22 +2596,31 @@ Treat the recovery message as a warning, not a fatal error. Use the exposed Sear
25962596
'Agent Device Tester is already open on this session; its widget-ready state is prepared',
25972597
'agent-device open com.apple.springboard --platform ios binds the session to SpringBoard for selector-driven commands; there is no separate widget/system command',
25982598
'Entering SpringBoard edit mode needs one deliberate empty-space long-press on the home screen; there is no selector for it',
2599-
'The widget-gallery search-result row for "Calendar" currently returns an unlabeled accessibility node, so select it by coordinates read from a screenshot',
2600-
'SpringBoard control labels vary by iOS version and locale; discover them from a fresh snapshot -i instead of assuming fixed English strings',
2599+
'After edit mode, a fresh interactive snapshot exposes the Edit menu entry that opens the widget gallery as ref @e30',
2600+
'Inside the widget gallery, a fresh interactive snapshot exposes the search field as ref @e31',
2601+
'The widget-gallery search-result row for "Calendar" currently returns an unlabeled accessibility node, so select it by coordinates read from a screenshot instead',
2602+
'After choosing the result, a fresh interactive snapshot exposes the size-picker placement control as ref @e35',
2603+
'SpringBoard control labels vary by iOS version and locale; do not assume fixed English strings such as "Add Widget" or "Edit" — use the refs above, sourced from a fresh snapshot -i, instead',
26012604
],
2602-
task: 'Plan the commands to open SpringBoard, enter edit mode, search the widget gallery for "Calendar", add it using the documented coordinate fallback for the unlabeled search-result row, reopen Agent Device Tester to resume app automation, and close the session.',
2605+
task: 'Plan the commands to open SpringBoard, enter edit mode, open the widget gallery with @e30, search it for "Calendar" using @e31, select the result using the documented coordinate fallback for the unlabeled search-result row, place the widget with @e35, reopen Agent Device Tester to resume app automation, and close the session.',
26032606
outputs: [
26042607
plannedCommand('open com.apple.springboard'),
26052608
/--platform ios/i,
26062609
/snapshot\b[^\n]*-i\b/i,
26072610
plannedCommand('longpress'),
2611+
/(?:^|\n)(?:agent-device\s+)?(?:press|click)\s+@e30\b/i,
2612+
/(?:^|\n)(?:agent-device\s+)?fill\s+@e31\b[^\n]*Calendar/i,
26082613
/(?:^|\n)(?:agent-device\s+)?screenshot\b/i,
26092614
RAW_COORDINATE_TARGET,
2610-
/label=["']Add Widget["']/i,
2615+
/(?:^|\n)(?:agent-device\s+)?(?:press|click)\s+@e35\b/i,
26112616
plannedCommand('open com.callstack.agentdevicelab'),
26122617
plannedCommand('close'),
26132618
],
2614-
forbiddenOutputs: [plannedCommandAlternatives(['widget', 'widget add']), /widget\s+add/i],
2619+
forbiddenOutputs: [
2620+
plannedCommandAlternatives(['widget', 'widget add']),
2621+
/widget\s+add/i,
2622+
/label=["'](?:Add Widget|Edit|Done)["']/i,
2623+
],
26152624
}),
26162625
makeCase({
26172626
id: 'replay-maintenance-update',

0 commit comments

Comments
 (0)