@e2e-dev/mobile 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/.build.json +1 -1
- package/dist/actions.js +13 -2
- package/dist/errors.d.ts +2 -1
- package/dist/errors.js +2 -1
- package/package.json +5 -6
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ npm install --save-dev e2e @e2e-dev/mobile
|
|
|
19
19
|
|
|
20
20
|
`agent-device` needs Xcode with an iOS simulator runtime, or the Android SDK
|
|
21
21
|
with an emulator. A phone needs Developer Mode and runner signing on iOS, or
|
|
22
|
-
USB debugging authorized on Android (see [Physical devices](https://e2e.tester.army/docs/physical-devices)). Run `npx agent-device doctor` once before handing the target
|
|
22
|
+
USB debugging authorized on Android (see [Physical devices](https://e2e.tester.army/docs/mobile#physical-devices)). Run `npx agent-device doctor` once before handing the target
|
|
23
23
|
to the runner.
|
|
24
24
|
|
|
25
25
|
```ts title="e2e.config.ts"
|
package/dist/.build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.
|
|
1
|
+
{"version":"0.10.0"}
|
package/dist/actions.js
CHANGED
|
@@ -58,8 +58,19 @@ export function pointerInteraction(client, point, action, settle) {
|
|
|
58
58
|
return client.interactions.press({ ...at, count: 2, ...settle });
|
|
59
59
|
case 'longPress':
|
|
60
60
|
return client.interactions.longPress({ ...at, ...settle, durationMs: action.durationMs ?? DEFAULT_LONG_PRESS_MS });
|
|
61
|
-
case 'swipeTo':
|
|
62
|
-
|
|
61
|
+
case 'swipeTo': {
|
|
62
|
+
const to = { x: action.target.x, y: action.target.y };
|
|
63
|
+
if (action.durationMs !== undefined) {
|
|
64
|
+
return client.interactions.pan({
|
|
65
|
+
x: at.x,
|
|
66
|
+
y: at.y,
|
|
67
|
+
dx: to.x - at.x,
|
|
68
|
+
dy: to.y - at.y,
|
|
69
|
+
durationMs: action.durationMs,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return client.interactions.swipe({ from: at, to });
|
|
73
|
+
}
|
|
63
74
|
case 'secondaryTap':
|
|
64
75
|
case 'hover':
|
|
65
76
|
case 'dragTo':
|
package/dist/errors.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export declare function runCommand<T>(label: string, work: () => Promise<T>, sig
|
|
|
57
57
|
* retryable `NODE_STALE`: nothing was dispatched, so the harness may
|
|
58
58
|
* re-observe and re-resolve the node instead of failing the action. Keyed on
|
|
59
59
|
* the reason alone: agent-device marks a drag's stale ref `dispatched:
|
|
60
|
-
* 'unknown'` although it refuses it
|
|
60
|
+
* 'unknown'` after Android blocking-dialog recovery, although it refuses it
|
|
61
|
+
* before the gesture.
|
|
61
62
|
*/
|
|
62
63
|
export declare function staleOr(cause: unknown, operation: string, where?: string): Error;
|
package/dist/errors.js
CHANGED
|
@@ -224,7 +224,8 @@ export async function runCommand(label, work, signal, where) {
|
|
|
224
224
|
* retryable `NODE_STALE`: nothing was dispatched, so the harness may
|
|
225
225
|
* re-observe and re-resolve the node instead of failing the action. Keyed on
|
|
226
226
|
* the reason alone: agent-device marks a drag's stale ref `dispatched:
|
|
227
|
-
* 'unknown'` although it refuses it
|
|
227
|
+
* 'unknown'` after Android blocking-dialog recovery, although it refuses it
|
|
228
|
+
* before the gesture.
|
|
228
229
|
*/
|
|
229
230
|
export function staleOr(cause, operation, where) {
|
|
230
231
|
if (isClassified(cause))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e2e-dev/mobile",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Mobile engine (iOS and Android) for e2e agentic end-to-end testing, built on agent-device",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"e2e",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"NOTICE"
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"agent-device": "0.21.
|
|
54
|
+
"agent-device": "0.21.22",
|
|
55
55
|
"pngjs": "7.0.0",
|
|
56
56
|
"zod": "4.6.1"
|
|
57
57
|
},
|
|
@@ -68,19 +68,18 @@
|
|
|
68
68
|
"@types/node": "26.6.2",
|
|
69
69
|
"@types/pngjs": "6.0.5",
|
|
70
70
|
"ai": "7.0.107",
|
|
71
|
-
"e2e": "0.
|
|
71
|
+
"e2e": "0.18.0",
|
|
72
72
|
"typescript": "7.0.2",
|
|
73
73
|
"vitest": "5.0.1"
|
|
74
74
|
},
|
|
75
75
|
"engines": {
|
|
76
|
-
"node": "
|
|
76
|
+
"node": "^22.22.3 || >=24.8.0"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc --project tsconfig.build.json && node ../../scripts/stamp-dist.ts",
|
|
80
80
|
"typecheck": "tsc --noEmit",
|
|
81
81
|
"test": "vitest run",
|
|
82
82
|
"test:watch": "vitest",
|
|
83
|
-
"test:unit": "vitest run tests/unit"
|
|
84
|
-
"test:simulator": "E2E_AGENT_DEVICE_SIMULATOR=1 vitest run tests/integration"
|
|
83
|
+
"test:unit": "vitest run tests/unit"
|
|
85
84
|
}
|
|
86
85
|
}
|