Initial Commit

This commit is contained in:
2026-05-27 23:47:53 +01:00
parent fbc70f96e6
commit 9b28db724f
18103 changed files with 1600554 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
import { expect, test } from "@playwright/test";
/**
* Cluster C Playwright sweep — diagnostics overlay mount/unmount. The
* harness page exposes `window.mountDiagnostics()` and
* `window.unmountDiagnostics()` hooks; this spec verifies the overlay
* element appears, displays the expected cache stats prefix, and
* unmounts cleanly.
*/
test.describe("diagnostics overlay (cluster C)", () => {
test("mounts and unmounts cleanly", async ({ page }) => {
await page.goto("/");
const mountedText = await page.evaluate(async () => {
const win = window as unknown as {
mountDiagnostics?: () => Promise<void>;
};
if (typeof win.mountDiagnostics !== "function") return null;
await win.mountDiagnostics();
return document.querySelector("[data-packer-browser-diagnostics]")
?.textContent;
});
if (mountedText === null) {
test.skip(true, "harness did not expose mountDiagnostics");
return;
}
expect(mountedText).toContain("packer-browser cache.size");
const present = await page.evaluate(async () => {
const win = window as unknown as {
unmountDiagnostics?: () => void;
};
win.unmountDiagnostics?.();
return document.querySelector("[data-packer-browser-diagnostics]");
});
expect(present).toBeNull();
});
});