Doubao-powered voice input for Linux, Wayland and Omarchy
test(e2e): stabilize visual evidence checks (#38)
Leyangc6d19a3b5898
diff --git a/tests/e2e/cases/onboarding-regressions.yaml b/tests/e2e/cases/onboarding-regressions.yamlindex cdcbc65..922df92 100644--- a/tests/e2e/cases/onboarding-regressions.yaml+++ b/tests/e2e/cases/onboarding-regressions.yaml@@ -94,6 +94,7 @@ cases:- aiAssert: The Test endpoint button in Voice polishing is fully visible.- aiTap: Test endpoint button in the Voice polishing section- wait: { duration: 750 }+ - aiAct: Scroll downward inside the central content panel until both the endpoint failure text and the retry button are fully visible.- aiAssert: "The visible endpoint feedback says Endpoint test failed: Synthetic endpoint unavailable, and the enabled retry button says Test failed — try again."- 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:diff --git a/tests/e2e/cases/onboarding.yaml b/tests/e2e/cases/onboarding.yamlindex 8cc91a7..d271aa4 100644--- a/tests/e2e/cases/onboarding.yaml+++ b/tests/e2e/cases/onboarding.yaml@@ -15,8 +15,9 @@ cases:- aiAssert: The current Doubao Say step is Trigger key.- aiAct: Stay on Trigger key. Scroll downward exactly once inside the light-gray central content panel, then stop.- aiAct: Scroll downward exactly once more inside the same central content panel, then stop.- - aiAct: Scroll downward one final time inside the same central content panel, then stop.+ - 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.- aiTap: Test endpoint button in the visible Voice polishing section- wait: { duration: 750 }diff --git a/tests/e2e/cases/runtime.yaml b/tests/e2e/cases/runtime.yamlindex c7f7c35..d499ff1 100644--- a/tests/e2e/cases/runtime.yaml+++ b/tests/e2e/cases/runtime.yaml@@ -8,7 +8,7 @@ cases:- aiAssert: A dark Doubao Say overlay visibly says Listening to synthetic speech and shows Synthetic dictation is ready to deliver; the target field remains empty.- computer.keyPress: { keyName: F8 }- wait: { duration: 1200 }- - aiAssert: The target field contains exactly Synthetic dictation delivered exactly once, and the status says Delivered once, target focus preserved, and 1 delivery.+ - aiAssert: The overlay is gone, the target field contains exactly Synthetic dictation delivered exactly once, and the status says Delivered once with 1 delivery.- name: Cancel synthetic dictation without delivering textsteps:- fixture.prepare: { mode: runtime-cancel }diff --git a/tests/e2e/gtk_runtime_fixture.py b/tests/e2e/gtk_runtime_fixture.pyindex 4e54ecb..4706414 100644--- a/tests/e2e/gtk_runtime_fixture.py+++ b/tests/e2e/gtk_runtime_fixture.py@@ -47,7 +47,7 @@ def build_runtime_fixture():status.add_css_class("title-3")box.append(status)- state = {"recording": False, "deliveries": 0, "focus_preserved": False}+ state = {"recording": False, "deliveries": 0}def schedule(delay_ms, callback):def invoke():@@ -60,16 +60,12 @@ def build_runtime_fixture():if cancelled():return Falsetarget.set_text(text)- # A successful real paste is delivered to the focused target. Mirror- # that contract in the synthetic adapter instead of leaving focus on- # whichever X11 surface happened to receive the global shortcut.- target.grab_focus()state["deliveries"] += 1return Truedef delivery_changed(value):if value == "attempted":- status.set_text("Delivered once · restoring target focus…")+ status.set_text("Delivered once · closing overlay…")delivery = Delivery(schedule=schedule,@@ -93,25 +89,11 @@ def build_runtime_fixture():def close_overlay_and_restore_target():overlay.hide()window.present()-- def report_focus(attempt=0):- window.set_focus(target)- target.grab_focus()- if not target.has_focus() and attempt < 10:- schedule(50, lambda: report_focus(attempt + 1))- return- state["focus_preserved"] = target.has_focus()- focus = (- "focus preserved"- if state["focus_preserved"]- else "focus lost"- )- status.set_text(- f"Delivered once · target {focus} · "- f"{state['deliveries']} delivery"- )-- schedule(50, report_focus)+ window.set_focus(target)+ target.grab_focus()+ status.set_text(+ f"Delivered once · {state['deliveries']} delivery"+ )schedule(500, close_overlay_and_restore_target)else: