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,30 @@
import { expect, test } from "@playwright/test";
/**
* Cluster C Playwright sweep — encrypted archive end-to-end. The
* page-side script supplies an in-memory keyring and loads an encrypted
* archive whose bytes are gated by the `SP-ENC1` magic prefix. The
* loader decrypts, unpacks, and returns a Blob URL.
*/
test.describe("encrypted archive (cluster C)", () => {
test("decrypts a SP-ENC1 archive and yields a Blob URL", async ({
page,
}) => {
await page.goto("/");
const result = await page.evaluate(async () => {
const win = window as unknown as {
loadEncryptedSample?: () => Promise<{ url: string }>;
};
if (typeof win.loadEncryptedSample !== "function") {
return { skipped: true };
}
const { url } = await win.loadEncryptedSample();
return { skipped: false, urlStart: url.slice(0, 5) };
});
if ("skipped" in result && result.skipped) {
test.skip(true, "harness did not expose loadEncryptedSample");
return;
}
expect(result.urlStart).toBe("blob:");
});
});