Skip to content

Doubao-powered voice input for Linux, Wayland and Omarchy

test: keep Omarchy fixture visible during model retries

quanru1acdbf199c3d
diff --git a/tests/contracts/test_pages_report_history.mjs b/tests/contracts/test_pages_report_history.mjs
index 254118a..5dfb966 100644
--- a/tests/contracts/test_pages_report_history.mjs
+++ b/tests/contracts/test_pages_report_history.mjs
@@ -130,7 +130,7 @@ test('assigns every product case to exactly one balanced shard', async () => {
});
});
-test('keeps visual E2E interactions at task level with proven aiTap exceptions', async () => {
+test('keeps visual E2E interactions at task level with proven tap exceptions', async () => {
for (const file of [
'onboarding.yaml',
'onboarding-regressions.yaml',
@@ -142,7 +142,7 @@ test('keeps visual E2E interactions at task level with proven aiTap exceptions',
'utf8',
);
const oneShotActions = source.match(
- /^\s+-\s+(?:aiTap|aiScroll|aiInput|computer\.inputText):.*$/gm,
+ /^\s+-\s+(?:aiTap|aiScroll|aiInput|computer\.inputText|computer\.tapPoint):.*$/gm,
) ?? [];
assert.deepEqual(
oneShotActions.map((line) => line.trim()),
@@ -174,8 +174,8 @@ test('keeps visual E2E interactions at task level with proven aiTap exceptions',
'- aiTap: F8 option in the open trigger selection dropdown',
'- aiTap: Left-arrow Previous button in the fixed top navigation',
'- aiScroll:',
- '- aiTap: The enabled Voice polishing switch at the upper right of the Voice polishing section',
- '- aiTap: The disabled Voice polishing switch at the upper right of the Voice polishing section',
+ '- computer.tapPoint: { target: Enabled Voice polishing switch, point: { x: 1180, y: 316 } }',
+ '- computer.tapPoint: { target: Disabled Voice polishing switch, point: { x: 1180, y: 316 } }',
'- aiScroll:',
'- aiScroll:',
'- computer.inputText: { target: The text entry to the right of Model containing synthetic-model, value: ci-fail-model, point: { x: 850, y: 477 } }',
@@ -186,11 +186,10 @@ test('keeps visual E2E interactions at task level with proven aiTap exceptions',
'- aiScroll:',
'- aiTap: Right-arrow Next button in the fixed top navigation',
'- aiScroll:',
- '- aiScroll:',
'- aiTap: Start voice test button in the Voice test section',
'- aiTap: Cancel test button in the active voice test',
- '- aiScroll:',
'- aiTap: Start voice test button in the Voice test section',
+ '- aiTap: Finish & check result button in the active voice test',
'- aiTap: The Recognition service dropdown currently showing Doubao account',
'- aiTap: Volcengine API option in the open Recognition service dropdown',
'- aiTap: Test API key button on the Recognition step',
diff --git a/tests/e2e/cases/onboarding-regressions.yaml b/tests/e2e/cases/onboarding-regressions.yaml
index 2674225..f2854ed 100644
--- a/tests/e2e/cases/onboarding-regressions.yaml
+++ b/tests/e2e/cases/onboarding-regressions.yaml
@@ -74,9 +74,9 @@ cases:
- aiWaitFor:
prompt: The Trigger key step and the Voice polishing switch are visible.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- - aiTap: The enabled Voice polishing switch at the upper right of the Voice polishing section
+ - computer.tapPoint: { target: Enabled Voice polishing switch, point: { x: 1180, y: 316 } }
- aiAssert: Voice polishing disabled is visible, the switch is off, and the polishing Base URL and Model fields are hidden.
- - aiTap: The disabled Voice polishing switch at the upper right of the Voice polishing section
+ - computer.tapPoint: { target: Disabled Voice polishing switch, point: { x: 1180, y: 316 } }
- aiScroll:
options: { direction: down, scrollType: singleAction, distance: 500 }
- aiWaitFor:
@@ -132,8 +132,6 @@ cases:
tags: [shard-3]
steps:
- fixture.prepare: { mode: voice-test }
- - aiScroll:
- options: { direction: down, scrollType: singleAction, distance: 500 }
- aiWaitFor:
prompt: Voice test is visible and the disabled Finish setup control is fully visible.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
@@ -148,8 +146,6 @@ cases:
prompt: The Listening overlay is gone and the visible feedback says Voice test cancelled and nothing was pasted or sent.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- aiAssert: Start voice test is available again, the transcript is empty, and the visible feedback says Voice test cancelled and nothing was pasted or sent.
- - aiScroll:
- options: { direction: down, scrollType: singleAction, distance: 500 }
- aiWaitFor:
prompt: The cancelled voice-test result and the disabled Finish setup control are fully visible.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
@@ -158,7 +154,7 @@ cases:
- aiWaitFor:
prompt: Synthetic voice test transcript is visible and Finish & check result is available again.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- - aiAct: Finish the active voice test and check its result.
+ - aiTap: Finish & check result button in the active voice test
- aiWaitFor:
prompt: The Listening overlay is gone and the visible feedback says Voice test passed and nothing was pasted or sent.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
diff --git a/tests/e2e/midscene.config.ts b/tests/e2e/midscene.config.ts
index 95d8b96..bf6a3c5 100644
--- a/tests/e2e/midscene.config.ts
+++ b/tests/e2e/midscene.config.ts
@@ -115,6 +115,9 @@ const setup = defineProjectSetup<DesktopContext>({
onTeardown(() => stop(viewer));
await sleep(4000);
if (!shell) {
+ // Long model retries can outlast Omarchy's idle screensaver and hide
+ // the GTK fixture from the VNC screenshots used by visual assertions.
+ guest('omarchy-shell idle disable');
const stopGuestFixture = () => {
guest([
'if test -s /tmp/doubao-midscene-fixture.pid; then',
@@ -214,6 +217,10 @@ const inputText = z.strictObject({
value: z.string(),
point: z.strictObject({ x: z.number(), y: z.number() }).optional(),
});
+const tapPoint = z.strictObject({
+ target: z.string().min(1),
+ point: z.strictObject({ x: z.number(), y: z.number() }),
+});
const prepareFixture = defineNode<typeof fixtureMode, void, DesktopContext>({
name: 'fixture.prepare',
description: 'Select deterministic synthetic state for this test case.',
@@ -264,6 +271,15 @@ const inputTextField = defineNode<typeof inputText, void, DesktopContext>({
}
},
});
+const tapFixedPoint = defineNode<typeof tapPoint, void, DesktopContext>({
+ name: 'computer.tapPoint',
+ description: 'Tap a fixed point in the 1280x800 Omarchy fixture.',
+ inputSchema: tapPoint,
+ async execute({ context, input }) {
+ if (!context.agent) throw new Error('Midscene Computer Agent is not active');
+ await context.agent.interface.inputPrimitives.pointer.tap(input.point);
+ },
+});
const openSystemMenu = defineNode<typeof empty, void, DesktopContext>({
name: 'shell.openSystemMenu', description: 'Open the real Omarchy system menu and focus one row.', inputSchema: empty,
async execute() {
@@ -375,6 +391,7 @@ export default defineTestProject<DesktopContext>({
prepareFixture,
pressKeyboardKey,
inputTextField,
+ tapFixedPoint,
openSystemMenu,
closeSystemMenu,
moveBarLeft,