Skip to content

Doubao-powered voice input for Linux, Wayland and Omarchy

test: select trigger presets through the real dropdown

quanrua244aa9e7561
diff --git a/tests/contracts/test_pages_report_history.mjs b/tests/contracts/test_pages_report_history.mjs
index 5dfb966..df25cb1 100644
--- a/tests/contracts/test_pages_report_history.mjs
+++ b/tests/contracts/test_pages_report_history.mjs
@@ -142,7 +142,7 @@ test('keeps visual E2E interactions at task level with proven tap exceptions', a
'utf8',
);
const oneShotActions = source.match(
- /^\s+-\s+(?:aiTap|aiScroll|aiInput|computer\.inputText|computer\.tapPoint):.*$/gm,
+ /^\s+-\s+(?:aiTap|aiScroll|aiInput|computer\.inputText|computer\.tapPoint|computer\.selectTriggerPreset):.*$/gm,
) ?? [];
assert.deepEqual(
oneShotActions.map((line) => line.trim()),
@@ -167,12 +167,11 @@ test('keeps visual E2E interactions at task level with proven tap exceptions', a
'- 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',
'- aiTap: Left-arrow Previous button in the fixed top navigation',
- '- aiTap: The trigger selection dropdown currently showing fn',
- '- aiTap: Disabled option in the open trigger selection dropdown',
- '- aiTap: Right-arrow Next button in the fixed top navigation',
- '- aiTap: The trigger selection dropdown currently showing Disabled',
- '- aiTap: F8 option in the open trigger selection dropdown',
- '- aiTap: Left-arrow Previous button in the fixed top navigation',
+ '- computer.selectTriggerPreset: { preset: Disabled }',
+ '- computer.tapPoint: { target: Right-arrow Next button in the fixed top navigation, point: { x: 1038, y: 203 } }',
+ '- computer.selectTriggerPreset: { preset: F8 }',
+ '- computer.tapPoint: { target: Right-arrow Next button in the fixed top navigation, point: { x: 1038, y: 203 } }',
+ '- computer.tapPoint: { target: Left-arrow Previous button in the fixed top navigation, point: { x: 240, y: 203 } }',
'- aiScroll:',
'- computer.tapPoint: { target: Enabled Voice polishing switch, point: { x: 1180, y: 316 } }',
'- computer.tapPoint: { target: Disabled Voice polishing switch, point: { x: 1180, y: 316 } }',
diff --git a/tests/e2e/cases/onboarding-regressions.yaml b/tests/e2e/cases/onboarding-regressions.yaml
index f2854ed..f6f07d1 100644
--- a/tests/e2e/cases/onboarding-regressions.yaml
+++ b/tests/e2e/cases/onboarding-regressions.yaml
@@ -47,19 +47,17 @@ cases:
steps:
- fixture.prepare: { mode: trigger-settings }
- aiAssert: The Trigger key step shows Choose how to start speaking and Voice polishing is enabled.
- - aiTap: The trigger selection dropdown currently showing fn
- - aiTap: Disabled option in the open trigger selection dropdown
- - aiAssert: Active trigger says Disabled and Voice polishing has not changed.
- - aiTap: Right-arrow Next button in the fixed top navigation
+ - computer.selectTriggerPreset: { preset: Disabled }
+ - aiAssert: Active trigger says Disabled, and the Voice polishing switch remains enabled.
+ - computer.tapPoint: { target: Right-arrow Next button in the fixed top navigation, point: { x: 1038, y: 203 } }
- aiAssert: The current step is still Trigger key and the message Choose an enabled trigger to continue is visible.
- - aiTap: The trigger selection dropdown currently showing Disabled
- - aiTap: F8 option in the open trigger selection dropdown
+ - computer.selectTriggerPreset: { preset: F8 }
- aiAssert: Active trigger shows F8 and F8 is selected in the trigger dropdown.
- - aiAct: Continue to Voice test.
+ - computer.tapPoint: { target: Right-arrow Next button in the fixed top navigation, point: { x: 1038, y: 203 } }
- aiWaitFor:
prompt: Voice test shows Try a sentence. Nothing gets pasted and the right-arrow Next button is disabled.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- - aiTap: Left-arrow Previous button in the fixed top navigation
+ - computer.tapPoint: { target: Left-arrow Previous button in the fixed top navigation, point: { x: 240, y: 203 } }
- aiWaitFor:
prompt: The Trigger key step is visible again.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
diff --git a/tests/e2e/midscene.config.ts b/tests/e2e/midscene.config.ts
index bf6a3c5..fee623a 100644
--- a/tests/e2e/midscene.config.ts
+++ b/tests/e2e/midscene.config.ts
@@ -221,6 +221,9 @@ const tapPoint = z.strictObject({
target: z.string().min(1),
point: z.strictObject({ x: z.number(), y: z.number() }),
});
+const triggerPreset = z.strictObject({
+ preset: z.enum(['Disabled', 'F8']),
+});
const prepareFixture = defineNode<typeof fixtureMode, void, DesktopContext>({
name: 'fixture.prepare',
description: 'Select deterministic synthetic state for this test case.',
@@ -280,6 +283,21 @@ const tapFixedPoint = defineNode<typeof tapPoint, void, DesktopContext>({
await context.agent.interface.inputPrimitives.pointer.tap(input.point);
},
});
+const selectTriggerPreset = defineNode<typeof triggerPreset, void, DesktopContext>({
+ name: 'computer.selectTriggerPreset',
+ description: 'Select a trigger preset through the GTK dropdown in the fixed Omarchy fixture.',
+ inputSchema: triggerPreset,
+ async execute({ context, input }) {
+ if (!context.agent || context.environment !== 'omarchy') {
+ throw new Error('Omarchy Computer Agent is not active');
+ }
+ await context.agent.interface.inputPrimitives.pointer.tap({ x: 640, y: 498 });
+ await sleep(250);
+ const keys = ['Home', ...Array(input.preset === 'F8' ? 6 : 0).fill('Down'), 'Return'];
+ guest(keys.map((key) => `wtype -k ${key}`).join('; '));
+ await sleep(250);
+ },
+});
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() {
@@ -392,6 +410,7 @@ export default defineTestProject<DesktopContext>({
pressKeyboardKey,
inputTextField,
tapFixedPoint,
+ selectTriggerPreset,
openSystemMenu,
closeSystemMenu,
moveBarLeft,