Skip to content

Doubao-powered voice input for Linux, Wayland and Omarchy

test: fix four Omarchy actions and retry transient Pages 503

quanrucb2d11c8657a
diff --git a/scripts/build-pages-report.mjs b/scripts/build-pages-report.mjs
index 534d93e..c97dd3b 100644
--- a/scripts/build-pages-report.mjs
+++ b/scripts/build-pages-report.mjs
@@ -497,9 +497,13 @@ async function fetchHistory(baseUrl) {
async function restoreReport(baseUrl, siteDirectory, report) {
for (const file of report.files ?? [report.reportPath]) {
- const response = await fetch(new URL(file, baseUrl), {
- redirect: 'follow',
- });
+ let response;
+ for (let attempt = 0; attempt < 3; attempt++) {
+ response = await fetch(new URL(file, baseUrl), { redirect: 'follow' });
+ if (response.status !== 503 || attempt === 2) break;
+ await response.body?.cancel();
+ await new Promise((done) => setTimeout(done, 1000 * (attempt + 1)));
+ }
if (!response.ok) {
throw new Error(
`Cannot restore report for run ${report.runId}: HTTP ${response.status}`,
diff --git a/tests/contracts/test_pages_report_history.mjs b/tests/contracts/test_pages_report_history.mjs
index acee963..c37436d 100644
--- a/tests/contracts/test_pages_report_history.mjs
+++ b/tests/contracts/test_pages_report_history.mjs
@@ -165,10 +165,14 @@ 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',
'- 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: 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',
'- 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',
+ '- 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 } }',
'- aiTap: Test endpoint button in the Voice polishing section',
@@ -178,6 +182,7 @@ 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: The Recognition service dropdown currently showing Doubao account',
'- aiTap: Volcengine API option in the open Recognition service dropdown',
'- aiTap: The microphone dropdown currently showing Synthetic microphone one',
@@ -1050,11 +1055,14 @@ test('restores retained history before adding the new run', async (context) => {
workflowUrl: 'https://github.com/quanru/doubao-say/actions/runs/100',
reportPath: 'reports/100/index.html',
};
+ let restoreAttempts = 0;
const server = await startServer((request, response) => {
if (request.url === '/reports/manifest.json') {
response.setHeader('content-type', 'application/json');
response.end(JSON.stringify({ version: 1, reports: [oldEntry] }));
} else if (request.url === '/reports/100/index.html') {
+ restoreAttempts++;
+ if (restoreAttempts === 1) return response.writeHead(503).end();
response.setHeader('content-type', 'text/html; charset=utf-8');
response.end(oldReport);
} else {
@@ -1071,6 +1079,7 @@ test('restores retained history before adding the new run', async (context) => {
manifest.reports.map((report) => report.runId),
['200', '100'],
);
+ assert.equal(restoreAttempts, 2);
assert.equal(
await readFile(
path.join(siteDirectory, 'reports', '100', 'index.html'),
diff --git a/tests/e2e/cases/onboarding-regressions.yaml b/tests/e2e/cases/onboarding-regressions.yaml
index 7c05b9f..5c9b3a8 100644
--- a/tests/e2e/cases/onboarding-regressions.yaml
+++ b/tests/e2e/cases/onboarding-regressions.yaml
@@ -31,7 +31,7 @@ cases:
prompt: The CI-only Synthetic Doubao sign-in window is visible.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- aiAssert: The synthetic sign-in window says it makes no network request and uses no real credentials.
- - aiAct: Simulate a successful sign-in.
+ - aiTap: The blue Simulate successful sign-in button in the CI-only modal, around 50% width and 43% screen height
- aiWaitFor:
prompt: The sign-in window is closed and Doubao Say has advanced to the Microphone step.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
@@ -54,7 +54,7 @@ cases:
- 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.
- - aiAct: Try to continue to the next step.
+ - aiTap: Right-arrow Next button in the fixed top navigation
- aiAssert: The current step is still Trigger key and the message Choose an enabled trigger to continue is visible.
- aiAct: Choose F8 in the trigger selection dropdown.
- aiAssert: Active trigger shows F8 and F8 is selected in the trigger dropdown.
@@ -79,7 +79,9 @@ cases:
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- aiTap: The enabled Voice polishing switch at the upper right of the Voice polishing section
- aiAssert: Voice polishing disabled is visible, the switch is off, and the polishing Base URL and Model fields are hidden.
- - aiAct: Turn Voice polishing on and reveal its Model input.
+ - aiTap: The disabled Voice polishing switch at the upper right of the Voice polishing section
+ - aiScroll:
+ options: { direction: down, scrollType: singleAction, distance: 500 }
- aiWaitFor:
prompt: Voice polishing is enabled and its Model input is visible.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
@@ -133,7 +135,8 @@ cases:
tags: [shard-3]
steps:
- fixture.prepare: { mode: voice-test }
- - aiAct: Reveal Finish setup.
+ - 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 }