From 3a12cf11e5d6726ed1f25c67de69d18229a8ac58 Mon Sep 17 00:00:00 2001 From: "pulse-triage[bot]" <249995291+pulse-triage[bot]@users.noreply.github.com> Date: Sun, 4 Oct 2026 15:41:57 +0100 Subject: [PATCH] Retain successful Diagnostics journey screenshots and runner facts Capture final rendered state on every desktop and phone case, plus disabled exports during refresh. Bound the offline driver to leave time for owned teardown and retain its runner identity without retries or broader production claims. Contract-Neutral: Integration proof capture only; production behavior and API contracts unchanged. Change-source: pulse-maintainer --- .../browser-tests/diagnostics-integration.cjs | 7 +++++-- .../tests/69-diagnostics-onboarding.spec.ts | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) 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", {