diff --git a/frontend-modern/browser-tests/diagnostics-integration.cjs b/frontend-modern/browser-tests/diagnostics-integration.cjs index cbdcaa1196..2134601ef3 100644 --- a/frontend-modern/browser-tests/diagnostics-integration.cjs +++ b/frontend-modern/browser-tests/diagnostics-integration.cjs @@ -57,6 +57,8 @@ const bootstrap = { const paths = [ 'tests/integration/tests/69-diagnostics-onboarding.spec.ts', 'tests/integration/playwright.config.ts', + 'tests/integration/tests/helpers.ts', + 'tests/integration/tsconfig.json', 'frontend-modern/src/App.tsx', 'frontend-modern/src/components/Settings/DiagnosticsPanel.tsx', 'frontend-modern/src/components/Settings/DiagnosticsResultsPanel.tsx', @@ -127,7 +129,8 @@ const bootstrap = { const { devices } = require('/workspace/tests/integration/node_modules/@playwright/test'); module.exports = { testDir: '/workspace/tests/integration/tests', testMatch: '69-diagnostics-onboarding.spec.ts', - workers: 1, retries: 0, timeout: 180000, expect: { timeout: 20000 }, + workers: 1, retries: 0, maxFailures: 1, globalTimeout: 135000, + timeout: 180000, expect: { timeout: 20000 }, outputDir: '${out}/results', reporter: [['list'], ['json', { outputFile: '${out}/result.json' }]], use: { baseURL: '${origin}', trace: 'off', screenshot: 'only-on-failure', acceptDownloads: true }, projects: [ @@ -164,7 +167,7 @@ const bootstrap = { }, ); child.on('error', reject); - child.on('exit', (exit, signal) => resolve({ exit, signal })); + child.on('exit', (exit, signal) => resolve({ pid: child.pid, exit, signal })); }); } finally { for (const socket of sockets.clients) socket.terminate(); diff --git a/tests/integration/tests/69-diagnostics-onboarding.spec.ts b/tests/integration/tests/69-diagnostics-onboarding.spec.ts index 6852c0833f..3d6f292ec8 100644 --- a/tests/integration/tests/69-diagnostics-onboarding.spec.ts +++ b/tests/integration/tests/69-diagnostics-onboarding.spec.ts @@ -515,6 +515,15 @@ async function assertControlsInViewport( test.describe("Diagnostics safe collection and local exports", () => { test.setTimeout(180_000); + test.afterEach(async ({ page }, testInfo) => { + if (testInfo.status === "passed") { + await page.screenshot({ + path: testInfo.outputPath("diagnostics-completed-state.png"), + fullPage: true, + }); + } + }); + test("keeps internal analytics absent and connects safety guidance to keyboard-accessible controls", async ({ page, }, testInfo) => { @@ -730,6 +739,10 @@ test.describe("Diagnostics safe collection and local exports", () => { await expect(full).toBeDisabled(); await expect(github).toBeDisabled(); expect(reads).toBe(2); + await page.screenshot({ + path: testInfo.outputPath("diagnostics-refresh-disabled.png"), + fullPage: true, + }); release!(); await expect( page.getByRole("heading", {