Checkpoint web parity through Chromium input tasks
This commit is contained in:
16
web/tests/e2e/script-trust-policy.spec.ts
Normal file
16
web/tests/e2e/script-trust-policy.spec.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("M13-02C resolves signer identity and rotation policy without enabling execution", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
const result = await page.evaluate(() => new Promise<Record<string, unknown>>((resolve, reject) => {
|
||||
const worker = new Worker("/src/workers/script-trust-policy-test.worker.ts", { type: "module" });
|
||||
worker.onmessage = (event: MessageEvent<Record<string, unknown>>) => { worker.terminate(); resolve(event.data); };
|
||||
worker.onerror = (event) => { worker.terminate(); reject(new Error(event.message)); };
|
||||
worker.postMessage({});
|
||||
}));
|
||||
expect(result.eligible).toEqual({ status: "ELIGIBLE", keyId: "key:new", publisher: "Team", trust: "ACTIVE", cryptographicVerification: "REQUIRED" });
|
||||
expect(result.revoked).toBe("REVOKED");
|
||||
expect(result.crossPublisher).toContain("SCRIPT_POLICY_DENIED");
|
||||
expect(result.policyExpired).toBe("POLICY_EXPIRED");
|
||||
expect(result.rotationSerialized).toBeGreaterThan(0);
|
||||
});
|
||||
Reference in New Issue
Block a user