Skip to content

Doubao-powered voice input for Linux, Wayland and Omarchy

fix(e2e): harden sharded desktop cases

quanruaf0b20c3241e
diff --git a/tests/e2e/README.md b/tests/e2e/README.md
index 453073f..cb062be 100644
--- a/tests/e2e/README.md
+++ b/tests/e2e/README.md
@@ -123,8 +123,8 @@ these alongside the successful onboarding case.
Each case receives a fresh computer agent, GTK fixture, and temporary config
directory. Fixture cleanup completes before the next case starts. Shortcut and
-polishing changes stay in memory; `synthetic-failing-model` produces a synthetic
-endpoint error, while `synthetic-model` succeeds without network traffic.
+polishing changes stay in memory; `ci-fail-model` produces a synthetic endpoint
+error, while `ci-ok-model` succeeds without network traffic.
These cases exercise production GTK widgets and the Delivery state machine with
synthetic callbacks. They do not establish live ASR, recording, durable
credential persistence, system-wide shortcut capture, clipboard paste, or
diff --git a/tests/e2e/cases/onboarding-regressions.yaml b/tests/e2e/cases/onboarding-regressions.yaml
index dc21466..fa2e436 100644
--- a/tests/e2e/cases/onboarding-regressions.yaml
+++ b/tests/e2e/cases/onboarding-regressions.yaml
@@ -93,8 +93,8 @@ cases:
- aiAct: Scroll inside the central content panel until the Voice polishing Model input is fully visible. Do not click Test endpoint.
- computer.inputText:
target: Voice polishing Model input
- value: synthetic-failing-model
- - aiAssert: The Voice polishing Model input contains exactly synthetic-failing-model.
+ value: ci-fail-model
+ - aiAssert: The Voice polishing Model input contains exactly ci-fail-model.
- aiAct: Scroll downward inside the central content panel until the Test endpoint button is fully visible.
- aiAssert: The Test endpoint button in Voice polishing is fully visible.
- aiTap: Test endpoint button in the Voice polishing section
@@ -104,8 +104,8 @@ cases:
- aiAct: Scroll upward inside the central content panel until the Model input under Voice polishing is fully visible. Do not click the retry button.
- computer.inputText:
target: Model input under Voice polishing
- value: synthetic-model
- - aiAssert: The Voice polishing Model input contains exactly synthetic-model, without the word failing.
+ value: ci-ok-model
+ - aiAssert: The Voice polishing Model input contains exactly ci-ok-model, without the word fail.
- aiAct: Scroll inside the central content panel until the Test failed — try again button is fully visible.
- aiTap: Test failed — try again button in the Voice polishing section
- wait: { duration: 750 }
diff --git a/tests/e2e/cases/onboarding.yaml b/tests/e2e/cases/onboarding.yaml
index 312076e..f0f3a38 100644
--- a/tests/e2e/cases/onboarding.yaml
+++ b/tests/e2e/cases/onboarding.yaml
@@ -19,7 +19,7 @@ cases:
- aiAct: Scroll inside the central content panel until the full model guidance, from Choose a small, fast model through fall back to your original text, is visible.
- aiAssert: The model guidance is readable and recommends a small, fast model with thinking off, names DeepSeek Flash and Gemini 2.5 Flash-Lite, and warns that large reasoning models may exceed five seconds and fall back to the original text.
- aiAct: Scroll downward inside the central content panel until the Test endpoint button is fully visible.
- - aiAssert: The Test endpoint button in the Voice polishing section is fully visible.
+ - aiAssert: The visible Test endpoint button is fully visible and enabled.
- aiTap: Test endpoint button in the visible Voice polishing section
- wait: { duration: 750 }
- aiAct: If needed, scroll down slightly inside the central content panel until Synthetic endpoint response is visible below Endpoint works. Keep both results on screen.
@@ -32,8 +32,8 @@ cases:
- aiAssert: The Voice test shows Synthetic voice test transcript and offers both Finish & check result and Cancel test.
- aiTap: Finish & check result button in the Voice test content panel
- wait: { duration: 750 }
- - aiAct: Scroll downward exactly once inside the Voice test content panel, then stop.
- - aiAssert: The enabled setup button visibly says Finish setup, Voice test passed, and nothing pasted or sent.
+ - aiAct: Scroll to the bottom of the Voice test content panel until the Finish setup button is fully visible. Do not stop at the Start voice test button.
+ - aiAssert: The Finish setup button is fully visible and enabled, and the confirmation says Voice test passed and nothing was pasted or sent.
- aiTap: Enabled setup button that says Voice test passed in the Voice test content panel
- wait: { duration: 500 }
- aiAssert: The Finish setup button changed to a disabled visible status saying Setup completed by the synthetic E2E fixture.
diff --git a/tests/e2e/gtk_onboarding_fixture.py b/tests/e2e/gtk_onboarding_fixture.py
index 4d426d7..266d26e 100644
--- a/tests/e2e/gtk_onboarding_fixture.py
+++ b/tests/e2e/gtk_onboarding_fixture.py
@@ -126,7 +126,7 @@ def build_onboarding_fixture(mode):
def test_endpoint(endpoint_settings, _key, done):
def finish():
- if endpoint_settings.polish_model == "synthetic-failing-model":
+ if endpoint_settings.polish_model == "ci-fail-model":
done(None, "Synthetic endpoint unavailable")
else:
done("Synthetic endpoint response", None)
diff --git a/tests/e2e/midscene.config.ts b/tests/e2e/midscene.config.ts
index d346922..446dcb8 100644
--- a/tests/e2e/midscene.config.ts
+++ b/tests/e2e/midscene.config.ts
@@ -126,10 +126,13 @@ const setup = defineProjectSetup<DesktopContext>({
onTeardown(stopGuestFixture);
context.resetFixture = async (mode) => {
const encodedMode = Buffer.from(mode).toString('base64');
+ const expectedTitle = mode.startsWith('runtime-')
+ ? 'Synthetic dictation target'
+ : 'Doubao Say';
stopGuestFixture();
guest(`rm -rf /tmp/doubao-midscene-config; mkdir -p /tmp/doubao-midscene-config; export PYTHONPATH='/home/omarchy/.config/omarchy/plugins/md.lifeos.doubao-say/src'; export XDG_CONFIG_HOME=/tmp/doubao-midscene-config; export PYTHONDONTWRITEBYTECODE=1; export DOUBAO_E2E_MODE_B64='${encodedMode}'; nohup setsid python3 '/home/omarchy/.config/omarchy/plugins/md.lifeos.doubao-say/tests/e2e/gtk_fixture.py' >/tmp/doubao-midscene-fixture.log 2>&1 </dev/null & echo $! >/tmp/doubao-midscene-fixture.pid`);
for (let attempt = 0; attempt < 30; attempt++) {
- const ready = guest(`grep -q 'READY: synthetic Doubao Say GTK fixture' /tmp/doubao-midscene-fixture.log && hyprctl -j clients | jq -r '[.[] | select(.title == "Doubao Say")] | length' || true`);
+ const ready = guest(`grep -q 'READY: synthetic Doubao Say GTK fixture' /tmp/doubao-midscene-fixture.log && hyprctl -j clients | jq -r --arg title ${shellQuote(expectedTitle)} '[.[] | select(.title == $title)] | length' || true`);
if (ready === '1') return;
await sleep(2000);
}
@@ -235,7 +238,7 @@ const inputTextField = defineNode<typeof inputText, void, DesktopContext>({
await context.agent.aiTap(input.target);
await sleep(250);
guest(
- `wtype -M ctrl -k a -m ctrl; wtype ${shellQuote(input.value)}`,
+ `wtype -M ctrl -k a -m ctrl; wtype -d 35 ${shellQuote(input.value)}`,
);
} else {
await context.agent.aiInput(input.target, {