@@ -83,6 +83,25 @@ test("shows CSV losses and retains evidence after invalid source", async ({
|
||||
await expect(output).toHaveValue(previous);
|
||||
});
|
||||
|
||||
test("identifies bounded signatures and exposes the portable evidence contract", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/deep/nested/format-lab/");
|
||||
await page
|
||||
.locator('input[type="file"]')
|
||||
.first()
|
||||
.setInputFiles("tests/fixtures/signature.pdf");
|
||||
await expect(page.getByText(/PDF \(strong: %PDF- header/u)).toBeVisible();
|
||||
await page.getByText("Portable evidence JSON", { exact: true }).click();
|
||||
const evidence = await page
|
||||
.getByRole("textbox", { name: "Evidence report", exact: true })
|
||||
.inputValue();
|
||||
expect(JSON.parse(evidence)).toMatchObject({
|
||||
contractVersion: 1,
|
||||
provenance: { execution: "local-browser", networkRequired: false },
|
||||
});
|
||||
});
|
||||
|
||||
test("integrates help, themes, identity, headers and offline reload", async ({
|
||||
page,
|
||||
request,
|
||||
@@ -115,7 +134,7 @@ test("integrates help, themes, identity, headers and offline reload", async ({
|
||||
);
|
||||
await expect(manifest.json()).resolves.toMatchObject({
|
||||
id: "de.add-ideas.format-lab",
|
||||
version: "0.1.0",
|
||||
version: "0.2.0",
|
||||
privacy: { processing: "local", telemetry: false },
|
||||
});
|
||||
await context.setOffline(true);
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("keeps the primary workspace inside a narrow viewport", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/deep/nested/format-lab/");
|
||||
await expect(page.locator("main").first()).toBeVisible();
|
||||
await expect(
|
||||
page.locator("main .loading, main .workbench-loading"),
|
||||
).toHaveCount(0);
|
||||
|
||||
const widths = await page.evaluate(() => ({
|
||||
content: document.documentElement.scrollWidth,
|
||||
viewport: document.documentElement.clientWidth,
|
||||
}));
|
||||
expect(widths.viewport).toBeLessThanOrEqual(430);
|
||||
expect(widths.content).toBeLessThanOrEqual(widths.viewport + 1);
|
||||
});
|
||||
Reference in New Issue
Block a user