Skip to content

Commit e1f72f2

Browse files
committed
test(apple-runner): pin the macOS desktopScroll pixels request
1 parent 7a82c13 commit e1f72f2

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎contracts/fixtures/runner-requests.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
{"name": "ios-simulator.runner-selector-query.label", "producer": "packages/platform-apple/src/__tests__/runner-requests.test.ts", "request": {"command": "querySelector", "selectorKey": "label", "selectorValue": "Go", "appBundleId": "com.example.app", "commandId": "<commandId>"}},
5353
{"name": "ios-simulator.runner-session-readiness.uptime", "producer": "packages/platform-apple/src/runner/__tests__/runner-contract.test.ts", "request": {"command": "uptime", "commandId": "<commandId>"}},
5454
{"name": "macos.desktop-scroll.amount", "producer": "packages/platform-apple/src/__tests__/runner-requests.test.ts", "request": {"command": "desktopScroll", "direction": "down", "amount": 0.5, "durationMs": 300, "appBundleId": "com.example.app", "commandId": "<commandId>"}},
55+
{"name": "macos.desktop-scroll.pixels", "producer": "packages/platform-apple/src/__tests__/runner-requests.test.ts", "request": {"command": "desktopScroll", "direction": "up", "pixels": 200, "durationMs": 300, "appBundleId": "com.example.app", "commandId": "<commandId>"}},
5556
{"name": "macos.interactions-drag.single", "producer": "packages/platform-apple/src/__tests__/runner-requests.test.ts", "request": {"command": "drag", "x": 100, "y": 400, "x2": 100, "y2": 200, "durationMs": 120, "appBundleId": "com.example.app", "commandId": "<commandId>"}},
5657
{"name": "macos.interactions-focus.coordinate", "producer": "packages/platform-apple/src/__tests__/runner-requests.test.ts", "request": {"command": "tap", "x": 10, "y": 20, "appBundleId": "com.example.app", "commandId": "<commandId>"}},
5758
{"name": "macos.interactions-mouse-click.middle", "producer": "packages/platform-apple/src/__tests__/runner-requests.test.ts", "request": {"command": "mouseClick", "x": 10, "y": 20, "button": "middle", "appBundleId": "com.example.app", "commandId": "<commandId>"}},

‎packages/platform-apple/src/__tests__/runner-requests.test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ const INTERACTOR_SITES: Record<string, InteractorDrive> = {
131131
MACOS_DEVICE,
132132
(i) => i.scroll('down', { amount: 0.5, durationMs: 300 }),
133133
],
134+
'macos.desktop-scroll.pixels': [
135+
MACOS_DEVICE,
136+
(i) => i.scroll('up', { pixels: 200, durationMs: 300 }),
137+
],
134138
'ios-simulator.interactor-find-text.text': [
135139
IOS_SIMULATOR,
136140
(i) => i.findText!('Ready', { appBundleId: APP }),

0 commit comments

Comments
 (0)