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
This commit is contained in:
pulse-triage[bot]
2026-10-04 15:41:57 +01:00
parent 5ecb568407
commit 3a12cf11e5
2 changed files with 18 additions and 2 deletions
@@ -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();
@@ -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", {