@parcha/agentrun-computer 0.1.0-beta.36 → 0.1.0-beta.37

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.
Files changed (121) hide show
  1. package/NOTICE +2 -0
  2. package/README.md +321 -308
  3. package/box/build-agent37.mjs +177 -0
  4. package/dist/agent37.d.ts +165 -0
  5. package/dist/agent37.js +759 -0
  6. package/dist/attach.d.ts +146 -0
  7. package/dist/attach.js +469 -0
  8. package/dist/browserbase.d.ts +2 -4
  9. package/dist/browserbase.js +2 -1
  10. package/dist/client.d.ts +33 -1
  11. package/dist/client.js +53 -0
  12. package/dist/computerd-linux-amd64 +0 -0
  13. package/dist/computerd-linux-arm64 +0 -0
  14. package/dist/conformance/agent37.d.ts +96 -0
  15. package/dist/conformance/agent37.js +154 -0
  16. package/dist/conformance/cases/apps.d.ts +5 -0
  17. package/dist/conformance/cases/apps.js +160 -73
  18. package/dist/conformance/cases/health.js +14 -0
  19. package/dist/conformance/cases/index.js +2 -0
  20. package/dist/conformance/cases/provider.js +27 -1
  21. package/dist/conformance/cases/screen.d.ts +3 -0
  22. package/dist/conformance/cases/screen.js +18 -0
  23. package/dist/conformance/cases/settings.d.ts +29 -23
  24. package/dist/conformance/cases/settings.js +76 -58
  25. package/dist/conformance/cases/touch.js +19 -17
  26. package/dist/conformance/cases/ui.d.ts +2 -0
  27. package/dist/conformance/cases/ui.js +475 -0
  28. package/dist/conformance/cli.d.ts +9 -0
  29. package/dist/conformance/cli.js +28 -3
  30. package/dist/conformance/e2b.d.ts +6 -0
  31. package/dist/conformance/e2b.js +9 -2
  32. package/dist/conformance/fixture.d.ts +1 -1
  33. package/dist/conformance/fixture.js +25 -1
  34. package/dist/conformance/modal.d.ts +17 -13
  35. package/dist/conformance/modal.js +18 -9
  36. package/dist/conformance/orgo.d.ts +3 -3
  37. package/dist/conformance/orgo.js +6 -8
  38. package/dist/conformance/phone-harness.d.ts +6 -2
  39. package/dist/conformance/phone-harness.js +21 -4
  40. package/dist/conformance/report.js +1 -1
  41. package/dist/conformance/runner.js +23 -4
  42. package/dist/conformance/sweep.d.ts +50 -0
  43. package/dist/conformance/sweep.js +187 -0
  44. package/dist/conformance/types.d.ts +11 -3
  45. package/dist/conformance/ui-fixture.d.ts +56 -0
  46. package/dist/conformance/ui-fixture.js +43 -0
  47. package/dist/create-requests.d.ts +51 -0
  48. package/dist/create-requests.js +121 -0
  49. package/dist/daytona.d.ts +2 -4
  50. package/dist/daytona.js +3 -2
  51. package/dist/descriptor.d.ts +5 -0
  52. package/dist/descriptor.js +2 -0
  53. package/dist/descriptors/agent37.d.ts +41 -0
  54. package/dist/descriptors/agent37.js +28 -0
  55. package/dist/descriptors/index.d.ts +38 -2
  56. package/dist/descriptors/index.js +4 -2
  57. package/dist/descriptors/orgo.d.ts +2 -1
  58. package/dist/descriptors/orgo.js +3 -2
  59. package/dist/descriptors/phone-harness.d.ts +1 -1
  60. package/dist/descriptors/phone-harness.js +2 -2
  61. package/dist/docker.d.ts +7 -4
  62. package/dist/docker.js +271 -29
  63. package/dist/e2b.d.ts +9 -165
  64. package/dist/e2b.js +282 -1342
  65. package/dist/fake-ui-driver.d.ts +97 -0
  66. package/dist/fake-ui-driver.js +717 -0
  67. package/dist/host.d.ts +182 -0
  68. package/dist/host.js +1 -0
  69. package/dist/hosted/process.d.ts +67 -0
  70. package/dist/hosted/process.js +228 -0
  71. package/dist/hosted/provider.d.ts +146 -0
  72. package/dist/hosted/provider.js +1364 -0
  73. package/dist/hosted/scripts.d.ts +76 -0
  74. package/dist/{child.js → hosted/scripts.js} +93 -12
  75. package/dist/index.d.ts +7 -3
  76. package/dist/index.js +7 -4
  77. package/dist/kernel.d.ts +2 -4
  78. package/dist/kernel.js +2 -1
  79. package/dist/kinds.d.ts +8 -1
  80. package/dist/kinds.js +20 -4
  81. package/dist/local-chrome.d.ts +2 -4
  82. package/dist/local-chrome.js +2 -1
  83. package/dist/modal.d.ts +23 -181
  84. package/dist/modal.js +271 -1244
  85. package/dist/orgo-channel.d.ts +3 -2
  86. package/dist/orgo-channel.js +5 -2
  87. package/dist/orgo-desktop.d.ts +9 -4
  88. package/dist/orgo-desktop.js +33 -13
  89. package/dist/orgo-workspaces.d.ts +47 -0
  90. package/dist/orgo-workspaces.js +94 -0
  91. package/dist/orgo.d.ts +10 -4
  92. package/dist/orgo.js +30 -12
  93. package/dist/phone-harness.d.ts +31 -22
  94. package/dist/phone-harness.js +510 -698
  95. package/dist/png.d.ts +4 -0
  96. package/dist/png.js +27 -0
  97. package/dist/protocol.d.ts +335 -32
  98. package/dist/protocol.js +96 -3
  99. package/dist/provider.d.ts +34 -6
  100. package/dist/provider.js +16 -0
  101. package/dist/result.d.ts +1 -1
  102. package/dist/surface/api.d.ts +248 -0
  103. package/dist/surface/api.js +1 -0
  104. package/dist/surface/core.d.ts +42 -0
  105. package/dist/surface/core.js +393 -0
  106. package/dist/surface/index.d.ts +5 -0
  107. package/dist/surface/index.js +3 -0
  108. package/dist/surface/outline.d.ts +8 -0
  109. package/dist/surface/outline.js +50 -0
  110. package/dist/surface/script.d.ts +10 -0
  111. package/dist/surface/script.js +92 -0
  112. package/dist/ui-engine.d.ts +114 -0
  113. package/dist/ui-engine.js +798 -0
  114. package/package.json +17 -1
  115. package/dist/child.d.ts +0 -42
  116. package/dist/conformance/e2b-diagnose.d.ts +0 -16
  117. package/dist/conformance/e2b-diagnose.js +0 -61
  118. package/dist/conformance/e2b-sweep.d.ts +0 -18
  119. package/dist/conformance/e2b-sweep.js +0 -132
  120. package/dist/conformance/modal-sweep.d.ts +0 -22
  121. package/dist/conformance/modal-sweep.js +0 -213
@@ -1,9 +1,10 @@
1
+ import { windowRectToPixels } from "../../ui-engine.js";
1
2
  /** The stock Settings app of each phone kind this suite knows. */
2
3
  export const PHONE_SETTINGS = { android: "com.android.settings" };
3
- /** Whether the case checks what it did through Settings: a phone with apps and a UI tree that takes no fixture file. */
4
+ /** Whether the case checks what it did through Settings: a phone with apps and the ui group that takes no fixture file. */
4
5
  export function throughSettings(t) {
5
6
  const { kind, groups } = t.provider.capabilities();
6
- return PHONE_SETTINGS[kind] !== undefined && !groups.includes("files") && groups.includes("apps") && groups.includes("apps.ui_tree");
7
+ return PHONE_SETTINGS[kind] !== undefined && !groups.includes("files") && groups.includes("apps") && groups.includes("ui");
7
8
  }
8
9
  /** The kind's Settings app, or the case skips in words. */
9
10
  export function settingsApp(t) {
@@ -11,6 +12,8 @@ export function settingsApp(t) {
11
12
  return PHONE_SETTINGS[kind] ?? t.skip(`no stock app is known for a ${kind} computer`);
12
13
  }
13
14
  const foreground = async (t) => (await t.call("apps.list", {})).foreground;
15
+ /** The app in front's window, as ui.observe sees it. */
16
+ export const observe = (t) => t.call("ui.observe", {});
14
17
  /** Settings, fresh and in front: ended, launched, and waited for until it is the app in front. */
15
18
  export async function openSettings(t) {
16
19
  const app = settingsApp(t);
@@ -26,13 +29,24 @@ export async function openSettings(t) {
26
29
  }
27
30
  return app;
28
31
  }
32
+ /** Screenshot pixels per point: hello's screen.scale, else a screenshot's. */
33
+ async function scaleOf(t) {
34
+ const scale = t.hello.screen?.scale ?? (await t.call("screen.shot", {})).scale;
35
+ t.assert(typeof scale === "number" && Number.isFinite(scale) && scale > 0, `the screen's scale, to aim input.actions at a ui node: ${JSON.stringify(scale)} is not a positive number`);
36
+ return scale;
37
+ }
38
+ /** A point of a ui observation (window points) as input.actions aims it: screenshot pixels. */
39
+ export async function pixelsOf(t, seen, [x, y]) {
40
+ const [px, py] = windowRectToPixels(seen.window.bounds, await scaleOf(t), [x, y, 0, 0]);
41
+ return [px, py];
42
+ }
29
43
  /**
30
44
  * What a tap on a row met, in words for a failure: the screen in px and in dp (px over the shot's scale; Settings shows
31
- * two panes from 600 dp wide), what is in front, the tap point and the row's bounds, whether the row's title shows
32
- * outside the list (a page opened beside it), and whether the next row is still shown. A part that cannot be read
33
- * says so; none of it throws.
45
+ * two panes from 600 dp wide), what is in front, the tap point (px) and the row's bounds (points), whether the row's
46
+ * title shows outside the list (a page opened beside it), and whether the next row is still shown. A part that cannot
47
+ * be read says so; none of it throws.
34
48
  */
35
- export async function tapScene(t, { at, row, next, tree }) {
49
+ export async function tapScene(t, { at, row, next, seen }) {
36
50
  const unread = (error) => `unread (${error instanceof Error ? error.message : String(error)})`;
37
51
  let screen;
38
52
  try {
@@ -49,61 +63,66 @@ export async function tapScene(t, { at, row, next, tree }) {
49
63
  catch (error) {
50
64
  front = unread(error);
51
65
  }
52
- const tap = `the tap at ${at} on the row's bounds ${JSON.stringify(row.bounds)}`;
53
- if (tree === undefined)
54
- return `${screen}; in front: ${front}; ${tap}; no tree was read`;
55
- const list = listOf(tree);
56
- const inList = new Set(list === undefined ? [] : nodesOf(list));
57
- const outside = nodesOf(tree.root).find((node) => names(node, row.text) && !inList.has(node));
58
- const title = `its title outside the list: ${outside === undefined ? "no" : `yes, at ${JSON.stringify(outside.bounds)}`}`;
59
- const shown = `the row ${JSON.stringify(next.text)}: ${textsOf(tree).includes(next.text) ? "still shown" : "gone"}`;
66
+ const tap = `the tap at ${at} px on the row's bounds ${JSON.stringify(row.bounds)} pt`;
67
+ if (seen === undefined)
68
+ return `${screen}; in front: ${front}; ${tap}; no ui.observe was read`;
69
+ const list = listOf(seen);
70
+ const inList = new Set(list === undefined ? [] : under(seen, list));
71
+ const outside = seen.nodes.find((node) => node.name === row.text && !inList.has(node));
72
+ const title = `its title outside the list: ${outside === undefined ? "no" : `yes, at ${JSON.stringify(outside.bounds)} pt`}`;
73
+ const shown = `the row ${JSON.stringify(next.text)}: ${showsName(seen, next.text) ? "still shown" : "gone"}`;
60
74
  return `${screen}; in front: ${front}; ${tap}; ${title}; ${shown}`;
61
75
  }
62
- /** Every node of a tree, depth first. */
63
- export function nodesOf(root) {
64
- const out = [];
65
- const walk = (node) => {
76
+ /** A node and every node below it, in the observation's order: a node comes after its parent. */
77
+ export function under(seen, top) {
78
+ const refs = new Set([top.ref]);
79
+ const out = [top];
80
+ for (const node of seen.nodes.slice(seen.nodes.indexOf(top) + 1)) {
81
+ if (node.parent === undefined || !refs.has(node.parent))
82
+ continue;
83
+ refs.add(node.ref);
66
84
  out.push(node);
67
- for (const child of node.children ?? [])
68
- walk(child);
69
- };
70
- walk(root);
85
+ }
71
86
  return out;
72
87
  }
73
- /** Whether a node shows a name: as its text, or as its label (content-desc). */
74
- const names = (node, name) => node.text === name || node.label === name;
75
88
  /**
76
- * Whether a tree shows a name anywhere, as a text or a label. A live Android 15 Settings page shows its title only as
77
- * its collapsing toolbar's content-desc (phone probe 3), with no text node holding it.
89
+ * Whether an observation shows a name anywhere. A live Android 15 Settings page shows its title only as its collapsing
90
+ * toolbar's content-desc (phone probe 3), with no text node holding it; a driver gives either as the node's name.
78
91
  */
79
- export const showsName = (tree, name) => nodesOf(tree.root).some((node) => names(node, name));
80
- /** The texts a tree shows. */
81
- export const textsOf = (tree) => nodesOf(tree.root).flatMap((node) => (node.text ? [node.text] : []));
82
- /** The middle of a rect, in whole pixels. */
92
+ export const showsName = (seen, name) => seen.nodes.some((node) => node.name === name);
93
+ /** The names and values an observation shows, in order. */
94
+ export const namesOf = (seen) => seen.nodes.flatMap((node) => [node.name, node.value].filter((one) => one !== undefined));
95
+ /** The middle of a rect, in whole units. */
83
96
  export const middle = ([x, y, w, h]) => [Math.floor(x + w / 2), Math.floor(y + h / 2)];
84
- /** The scrollable list a tree shows, the first one. */
85
- export function listOf(tree) {
86
- return nodesOf(tree.root).find((node) => node.scrollable === true);
97
+ const SCROLLS = ["ACTION_SCROLL_FORWARD", "ACTION_SCROLL_BACKWARD"];
98
+ /** The roles a person taps. */
99
+ const TAPPED = new Set(["button", "link", "listitem", "menuitem", "tab"]);
100
+ const clickable = (node) => TAPPED.has(node.role) || (node.actions?.includes("ACTION_CLICK") ?? false);
101
+ /** The scrollable list an observation shows, the first one: a scrollarea, or a node that scrolls. */
102
+ export function listOf(seen) {
103
+ return seen.nodes.find((node) => node.role === "scrollarea" || (node.actions?.some((action) => SCROLLS.includes(action)) ?? false));
87
104
  }
88
- /** Whether a node, or one under it, says search: its text, its label or its id. */
89
- const saysSearch = (node) => nodesOf(node).some((one) => /search/i.test(`${one.text ?? ""} ${one.label ?? ""} ${one.id ?? ""}`));
105
+ /** Whether a node, or one under it, says search: its name, its value or its id. */
106
+ const saysSearch = (seen, node) => under(seen, node).some((one) => /search/i.test(`${one.name ?? ""} ${one.value ?? ""} ${one.id ?? ""}`));
90
107
  /**
91
- * The rows of a tree's list: each clickable node in it, whole inside it, with the first text it holds. Settings' search
92
- * entry is not a row, though a live Settings shows it as the list's first item.
108
+ * The rows of an observation's list: each clickable node in it, whole inside it, with the first text it holds (its own
109
+ * when it is a text, else a text node's under it). Settings' search entry is not a row, though a live Settings shows it
110
+ * as the list's first item.
93
111
  */
94
- export function rowsOf(tree) {
95
- const list = listOf(tree);
112
+ export function rowsOf(seen) {
113
+ const list = listOf(seen);
96
114
  if (list === undefined)
97
115
  return [];
98
116
  const [lx, ly, lw, lh] = list.bounds;
99
117
  const rows = [];
100
- for (const node of nodesOf(list).slice(1)) {
101
- if (node.clickable !== true || saysSearch(node))
118
+ for (const node of under(seen, list).slice(1)) {
119
+ if (!clickable(node) || saysSearch(seen, node))
102
120
  continue;
103
121
  const [x, y, w, h] = node.bounds;
104
122
  if (x < lx || y < ly || x + w > lx + lw || y + h > ly + lh || w === 0 || h === 0)
105
123
  continue;
106
- const text = nodesOf(node).find((one) => one.text)?.text;
124
+ // A driver that names a row from its children (phoned) gives the row its title; another lists the text under it.
125
+ const text = node.name ?? under(seen, node).find((one) => one.role === "text" && one.name)?.name;
107
126
  if (text !== undefined)
108
127
  rows.push({ text, bounds: node.bounds });
109
128
  }
@@ -112,31 +131,30 @@ export function rowsOf(tree) {
112
131
  /** Settings' top list, with at least `count` rows of different titles on screen, or the case fails in words. */
113
132
  export async function settingsRows(t, count) {
114
133
  return t.until(async () => {
115
- const tree = await t.call("apps.ui_tree", {});
116
- const rows = rowsOf(tree);
117
- return new Set(rows.map((row) => row.text)).size >= count ? { tree, rows } : undefined;
118
- }, `Settings' list with ${count} rows in apps.ui_tree`);
134
+ const seen = await observe(t);
135
+ const rows = rowsOf(seen);
136
+ return new Set(rows.map((row) => row.text)).size >= count ? { seen, rows } : undefined;
137
+ }, `Settings' list with ${count} rows in ui.observe`);
119
138
  }
120
139
  /**
121
- * A node text is typed into: any editable field, by its class, an EditText or a subclass the platform names apart
122
- * (AutoCompleteTextView, MultiAutoCompleteTextView, ExtractEditText). A live Android 15's Settings search field is an
123
- * AutoCompleteTextView (phone probe 2).
140
+ * A node text is typed into: a textbox or a searchbox. A live Android 15's Settings search field is an
141
+ * AutoCompleteTextView inside a SearchView (phone probe 2), which the adb phone gives as a searchbox.
124
142
  */
125
- const isField = (node) => /(EditText|AutoCompleteTextView)$/.test(node.role);
143
+ const isField = (node) => node.role === "textbox" || node.role === "searchbox";
126
144
  /**
127
145
  * Settings' search field, opened from its list: the case taps the search entry (the first clickable node that says
128
- * search, by its own text, label or id or a child's; a live Settings shows it inside the list, its text on a child) and
129
- * waits for the field. An empty field may show its hint as its text, so only the field is waited for.
146
+ * search, by its own name, value or id or a node's under it; a live Settings shows it inside the list, its text on a
147
+ * child) and waits for the field. An empty field may show its hint as its text, so only the field is waited for.
130
148
  */
131
149
  export async function openSearch(t) {
132
- const { tree } = await settingsRows(t, 1);
133
- const entry = t.present(nodesOf(tree.root).find((node) => node.clickable === true && saysSearch(node)), "Settings' search entry (a clickable node saying search) in apps.ui_tree");
134
- const at = middle(entry.bounds);
150
+ const { seen } = await settingsRows(t, 1);
151
+ const entry = t.present(seen.nodes.find((node) => clickable(node) && saysSearch(seen, node)), "Settings' search entry (a clickable node saying search) in ui.observe");
152
+ const at = await pixelsOf(t, seen, middle(entry.bounds));
135
153
  t.deepEqual(await t.call("input.actions", { actions: [{ type: "tap", at }] }), { done: 1 }, `input.actions of a tap on Settings' search entry at ${at}`);
136
- await t.until(async () => (await searchText(t)) !== undefined, "Settings' search field in apps.ui_tree");
154
+ await t.until(async () => (await searchText(t)) !== undefined, "Settings' search field in ui.observe");
137
155
  }
138
156
  /** The text in Settings' search field now, or undefined when no field is shown. */
139
157
  export async function searchText(t) {
140
- const field = nodesOf((await t.call("apps.ui_tree", {})).root).find(isField);
141
- return field === undefined ? undefined : (field.text ?? "");
158
+ const field = (await observe(t)).nodes.find(isField);
159
+ return field === undefined ? undefined : (field.value ?? "");
142
160
  }
@@ -1,5 +1,5 @@
1
1
  import { act, allRan, logged, pointIn } from "./input.js";
2
- import { listOf, middle, openSettings, rowsOf, settingsRows, showsName, tapScene, textsOf, throughSettings } from "./settings.js";
2
+ import { listOf, middle, observe, openSettings, pixelsOf, rowsOf, settingsRows, showsName, tapScene, throughSettings } from "./settings.js";
3
3
  /** How far a logged touch may be from where it was aimed: a phone's input path may round. */
4
4
  const SLACK = 2;
5
5
  const touches = (events) => events.filter((e) => e.event === "touch");
@@ -10,8 +10,8 @@ const lifted = (events, fingers) => new Set(touches(events).filter((e) => e.phas
10
10
  async function observed(t) {
11
11
  const declared = t.provider.capabilities().groups;
12
12
  if (!declared.includes("files")) {
13
- if (!declared.includes("apps.ui_tree"))
14
- return t.skip("no way to observe the effect: declare files or apps.ui_tree");
13
+ if (!declared.includes("ui"))
14
+ return t.skip("no way to observe the effect: declare files or ui");
15
15
  return t.skip(`no fixture runs on a ${t.provider.capabilities().kind} computer with no files, and no stock app is known for it`);
16
16
  }
17
17
  return t.fixture();
@@ -23,42 +23,44 @@ async function observed(t) {
23
23
  */
24
24
  async function tapThroughSettings(t) {
25
25
  await openSettings(t);
26
- const { rows } = await settingsRows(t, 2);
26
+ const { seen: list, rows } = await settingsRows(t, 2);
27
27
  const [row, next] = [rows[0], t.present(rows.find((one) => one.text !== rows[0].text), "a second row with another title")];
28
- const at = middle(row.bounds);
28
+ const at = await pixelsOf(t, list, middle(row.bounds));
29
29
  allRan(t, await act(t, [{ type: "tap", at }]), 1, `a tap on Settings' row ${JSON.stringify(row.text)} at ${at}`);
30
30
  let seen;
31
31
  try {
32
32
  await t.until(async () => {
33
- seen = await t.call("apps.ui_tree", {});
33
+ seen = await observe(t);
34
34
  return showsName(seen, row.text) && !showsName(seen, next.text);
35
- }, `the page of ${JSON.stringify(row.text)} after a tap on its row: its title, as a text or a label, and not the row ${JSON.stringify(next.text)}`);
35
+ }, `the page of ${JSON.stringify(row.text)} after a tap on its row: its title, as a node's name, and not the row ${JSON.stringify(next.text)}`);
36
36
  }
37
37
  catch (error) {
38
38
  // A live run showed only the wait: the words say what the case saw, so a page beside the list tells apart from a
39
39
  // tap that missed.
40
- throw new Error(`${error instanceof Error ? error.message : String(error)} (${await tapScene(t, { at, row, next, tree: seen })})`);
40
+ throw new Error(`${error instanceof Error ? error.message : String(error)} (${await tapScene(t, { at, row, next, seen })})`);
41
41
  }
42
42
  allRan(t, await act(t, [{ type: "button", name: "back" }]), 1, "the back button");
43
- await t.until(async () => textsOf(await t.call("apps.ui_tree", {})).includes(next.text), `Settings' list again after back: the row ${JSON.stringify(next.text)}`);
43
+ await t.until(async () => showsName(await observe(t), next.text), `Settings' list again after back: the row ${JSON.stringify(next.text)}`);
44
44
  }
45
45
  /** A swipe up Settings' list moves it up: a row on screen before and after is higher by a quarter of the swipe at least, or the first row has left. */
46
46
  async function swipeThroughSettings(t) {
47
47
  await openSettings(t);
48
- const { tree, rows } = await settingsRows(t, 2);
49
- const [x, y, w, h] = t.present(listOf(tree), "Settings' list in apps.ui_tree").bounds;
50
- const from = [Math.floor(x + w / 2), Math.floor(y + h * 0.8)];
51
- const to = [from[0], Math.floor(y + h * 0.2)];
48
+ const { seen, rows } = await settingsRows(t, 2);
49
+ const [x, y, w, h] = t.present(listOf(seen), "Settings' list in ui.observe").bounds;
50
+ // In window points, as the rows are; the swipe itself in pixels.
51
+ const top = [Math.floor(x + w / 2), Math.floor(y + h * 0.8)];
52
+ const bottom = [top[0], Math.floor(y + h * 0.2)];
53
+ const [from, to] = [await pixelsOf(t, seen, top), await pixelsOf(t, seen, bottom)];
52
54
  allRan(t, await act(t, [{ type: "swipe", path: [from, to], ms: 400 }]), 1, `a swipe up Settings' list from ${from} to ${to}`);
53
- const enough = (from[1] - to[1]) / 4;
55
+ const enough = (top[1] - bottom[1]) / 4;
54
56
  await t.until(async () => {
55
- const after = rowsOf(await t.call("apps.ui_tree", {}));
57
+ const after = rowsOf(await observe(t));
56
58
  const moved = rows.some((before) => {
57
59
  const now = after.find((one) => one.text === before.text);
58
60
  return now !== undefined && before.bounds[1] - now.bounds[1] >= enough;
59
61
  });
60
62
  return moved || (after.length > 0 && !after.some((one) => one.text === rows[0].text));
61
- }, `Settings' list moved up by ${Math.round(enough)} px at least after a swipe up`);
63
+ }, `Settings' list moved up by ${Math.round(enough)} points at least after a swipe up`);
62
64
  }
63
65
  /** One finger's touches: where it went down, and where it came up. */
64
66
  function stroke(t, events, pointer, what) {
@@ -101,7 +103,7 @@ export const touchCases = [
101
103
  const tried = await act(t, [{ type: "pinch", at: [Math.floor(shot.width / 2), Math.floor(shot.height / 2)], scale: 2, ms: 400 }]);
102
104
  if (tried.failed?.kind === "unsupported")
103
105
  return t.skip(`the provider refuses a pinch in words: ${tried.failed.message}`);
104
- return t.skip("a pinch shows nothing in Settings' tree; only the fixture's log sees one");
106
+ return t.skip("a pinch shows nothing in Settings' nodes; only the fixture's log sees one");
105
107
  }
106
108
  const fixture = await observed(t);
107
109
  const at = pointIn(fixture, 0.5, 0.5);
@@ -0,0 +1,2 @@
1
+ import type { Case } from "../types.js";
2
+ export declare const uiCases: Case[];