Skip to content

Doubao-powered voice input for Linux, Wayland and Omarchy

test(e2e): advance shard-2 actions and report capture

quanruee9ba6998bdb
diff --git a/tests/contracts/test_pages_report_history.mjs b/tests/contracts/test_pages_report_history.mjs
index 1f7b9fc..ffe4f61 100644
--- a/tests/contracts/test_pages_report_history.mjs
+++ b/tests/contracts/test_pages_report_history.mjs
@@ -165,13 +165,18 @@ test('keeps visual E2E interactions at task level with proven aiTap exceptions',
'- aiTap: The large blue full-width Open Doubao sign-in button near the bottom of the central Sign in panel, around 50% width and 73% screen height',
'- aiTap: The blue Simulate successful sign-in button in the CI-only modal, around 50% width and 43% screen height',
'- aiScroll:',
- '- computer.inputText: { target: The Model input in the Voice polishing section, value: ci-fail-model }',
+ '- computer.inputText: { target: The text entry to the right of Model containing synthetic-model, value: ci-fail-model, point: { x: 850, y: 477 } }',
+ '- aiTap: Test endpoint button in the Voice polishing section',
'- aiTap: The microphone dropdown currently showing Synthetic microphone one',
'- aiTap: Synthetic microphone two option in the open microphone dropdown',
'- aiTap: Right-arrow Next button in the fixed top navigation',
'- aiScroll:',
+ '- aiTap: Left-arrow Previous button in the fixed top navigation',
+ '- aiTap: Check microphone · 3 seconds button on the Microphone step',
'- aiTap: The trigger selection dropdown currently showing fn',
'- aiTap: Record a shortcut… option in the open trigger selection dropdown',
+ '- aiTap: Right-arrow Next button in the fixed top navigation',
+ '- aiTap: Left-arrow Previous button in the fixed top navigation',
]
: [],
`${file} must express visual interactions as task-level aiAct steps except for proven failures`,
@@ -197,6 +202,8 @@ test('captures both legacy and current Midscene report step lists', async () =>
source,
/\.runner-detail-step-group > button\.is-selected, .*\.runner-detail-step-list > button\.is-selected/,
);
+ assert.match(source, /waitUntil: 'domcontentloaded'/);
+ assert.match(source, /timeout: 120_000/);
});
function runnerScript({
diff --git a/tests/e2e/capture-report-preview.mjs b/tests/e2e/capture-report-preview.mjs
index 8cf2bfc..d8c6598 100644
--- a/tests/e2e/capture-report-preview.mjs
+++ b/tests/e2e/capture-report-preview.mjs
@@ -100,7 +100,13 @@ try {
const page = await browser.newPage();
await page.setViewport({ width: 1600, height: 1000, deviceScaleFactor: 1 });
- await page.goto(previewUrl.href, { waitUntil: 'networkidle0' });
+ // A failed run with repeated AI replans can embed many screenshots in the
+ // report. Wait for the document, then for the specific rendered evidence;
+ // waiting for all network activity can exceed Puppeteer's 30s default on CI.
+ await page.goto(previewUrl.href, {
+ waitUntil: 'domcontentloaded',
+ timeout: 120_000,
+ });
await page.waitForSelector(
'[aria-label="Execution steps"] button.is-selected .runner-step-status',
);
diff --git a/tests/e2e/cases/onboarding-regressions.yaml b/tests/e2e/cases/onboarding-regressions.yaml
index 340ac1b..568b8c9 100644
--- a/tests/e2e/cases/onboarding-regressions.yaml
+++ b/tests/e2e/cases/onboarding-regressions.yaml
@@ -90,9 +90,9 @@ cases:
- aiAssert: The Trigger key step shows Choose how to start speaking and Voice polishing is enabled.
- aiScroll:
options: { direction: down, scrollType: singleAction, distance: 500 }
- - computer.inputText: { target: The Model input in the Voice polishing section, value: ci-fail-model }
+ - computer.inputText: { target: The text entry to the right of Model containing synthetic-model, value: ci-fail-model, point: { x: 850, y: 477 } }
- aiAssert: The Voice polishing Model input contains exactly ci-fail-model.
- - aiAct: Test the Voice polishing endpoint.
+ - aiTap: Test endpoint button in the Voice polishing section
- aiWaitFor:
prompt: The endpoint feedback contains Synthetic endpoint unavailable and the retry button says Test failed — try again.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
@@ -196,7 +196,6 @@ cases:
- aiWaitFor:
prompt: The visible feedback says Microphone saved and requires a new three-second check.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- - aiAssert: Synthetic microphone two is selected and a new microphone check is required.
- aiTap: Right-arrow Next button in the fixed top navigation
- aiScroll:
options: { direction: down, scrollType: singleAction, distance: 500 }
@@ -204,7 +203,11 @@ cases:
prompt: Voice test is visible and Finish setup is fully visible.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- aiAssert: The Finish setup button is visibly disabled.
- - aiAct: Return to Microphone and run Check microphone · 3 seconds.
+ - aiTap: Left-arrow Previous button in the fixed top navigation
+ - aiWaitFor:
+ prompt: The Microphone step and Check microphone · 3 seconds button are visible.
+ options: { timeoutMs: 30000, checkIntervalMs: 1000 }
+ - aiTap: Check microphone · 3 seconds button on the Microphone step
- aiWaitFor:
prompt: The visible feedback says Microphone is working and Synthetic microphone two remains selected.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
@@ -219,14 +222,17 @@ cases:
tags: [shard-2]
steps:
- fixture.prepare: { mode: shortcut-capture }
- - aiAssert: Trigger key shows Active trigger fn and its trigger selection dropdown.
- aiTap: The trigger selection dropdown currently showing fn
- aiTap: Record a shortcut… option in the open trigger selection dropdown
- aiWaitFor:
prompt: The active trigger and trigger dropdown both show the control symbol ⌃ plus F8.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- aiAssert: The active and selected trigger is the custom shortcut ⌃ plus F8.
- - aiAct: Continue to Voice test and then return to Trigger key.
+ - aiTap: Right-arrow Next button in the fixed top navigation
+ - aiWaitFor:
+ prompt: Voice test is visible.
+ options: { timeoutMs: 30000, checkIntervalMs: 1000 }
+ - aiTap: Left-arrow Previous button in the fixed top navigation
- aiWaitFor:
prompt: Trigger key is visible again and still shows the custom shortcut.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
diff --git a/tests/e2e/midscene-node-reference.md b/tests/e2e/midscene-node-reference.md
index a693eb3..ffa536c 100644
--- a/tests/e2e/midscene-node-reference.md
+++ b/tests/e2e/midscene-node-reference.md
@@ -745,7 +745,7 @@ Locate and tap an element with a Midscene UI Agent.
### `computer.inputText`
-Replace text in a visually located input through the active Midscene Computer Agent.
+Replace text in a visually located input through the active Midscene Computer Agent. An optional point focuses a fixed-size Omarchy fixture input when visual localization is unreliable.
**String shorthand:** Not supported by this Node.
@@ -756,6 +756,15 @@ Replace text in a visually located input through the active Midscene Computer Ag
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
+ "point": {
+ "additionalProperties": false,
+ "properties": {
+ "x": { "type": "number" },
+ "y": { "type": "number" }
+ },
+ "required": ["x", "y"],
+ "type": "object"
+ },
"target": {
"minLength": 1,
"type": "string"
diff --git a/tests/e2e/midscene.config.ts b/tests/e2e/midscene.config.ts
index 38b9b1b..5aa615a 100644
--- a/tests/e2e/midscene.config.ts
+++ b/tests/e2e/midscene.config.ts
@@ -210,6 +210,7 @@ const keyboardKey = z.strictObject({
const inputText = z.strictObject({
target: z.string().min(1),
value: z.string(),
+ point: z.strictObject({ x: z.number(), y: z.number() }).optional(),
});
const prepareFixture = defineNode<typeof fixtureMode, void, DesktopContext>({
name: 'fixture.prepare',
@@ -240,10 +241,15 @@ const inputTextField = defineNode<typeof inputText, void, DesktopContext>({
async execute({ context, input }) {
if (!context.agent) throw new Error('Midscene Computer Agent is not active');
if (context.environment === 'omarchy') {
- // Midscene still finds and focuses the visual target. Send the text from
- // inside the Wayland guest because X11 clipboard typing stops at the VNC
- // boundary on some TigerVNC/GitHub runner combinations.
- await context.agent.aiTap(input.target);
+ // Focus the input through the VNC device. The optional point is reserved
+ // for a fixed-size fixture where the model repeatedly located the label
+ // instead of the entry. Send text inside Wayland because X11 clipboard
+ // typing stops at the VNC boundary on some runner combinations.
+ if (input.point) {
+ await context.agent.interface.inputPrimitives.pointer.tap(input.point);
+ } else {
+ await context.agent.aiTap(input.target);
+ }
await sleep(250);
guest(
`wtype -M ctrl -k a -m ctrl; wtype -d 35 ${shellQuote(input.value)}`,