@@ -37,7 +37,7 @@ test("preserves contacts on parse failure and generates QR locally", async ({
|
||||
await page.getByLabel("vCard source").fill("not a card");
|
||||
await page.getByRole("button", { name: "Parse safely" }).click();
|
||||
await expect(page.getByRole("alert")).toContainText("No complete");
|
||||
await page.getByRole("tab", { name: "Contact QR" }).click();
|
||||
await page.getByRole("button", { name: "Contact QR" }).click();
|
||||
await page.getByRole("button", { name: "Generate local QR preview" }).click();
|
||||
await expect(page.getByRole("img", { name: /QR code for/u })).toBeVisible();
|
||||
expect(external).toEqual([]);
|
||||
@@ -53,7 +53,7 @@ test("serves release identity and hardened headers", async ({ request }) => {
|
||||
const manifest = await request.get("/deep/nested/contact/toolbox-app.json");
|
||||
await expect(manifest.json()).resolves.toMatchObject({
|
||||
id: "de.add-ideas.contact-tools",
|
||||
version: "0.1.0",
|
||||
version: "0.2.0",
|
||||
entry: "./",
|
||||
privacy: { processing: "local", telemetry: false },
|
||||
});
|
||||
|
||||
@@ -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/contact/");
|
||||
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