Release Scan Tools 0.2.0
Verify / verify (push) Canceled after 0s

This commit is contained in:
2026-09-02 10:57:17 +02:00
parent 75cd6a6195
commit 8f34d05b75
29 changed files with 1000 additions and 136 deletions
+18 -2
View File
@@ -82,6 +82,11 @@ test("adds and corrects a real local image while retaining the previous preview"
"aria-valuetext",
/^1% from left/u,
);
await page.getByLabel("Corner 2 X (%)").fill("98.5");
await expect(page.getByRole("slider", { name: "Corner 2" })).toHaveAttribute(
"aria-valuetext",
/^99% from left/u,
);
const download = page.waitForEvent("download");
await page.getByRole("button", { name: "Download PNG" }).click();
expect((await download).suggestedFilename()).toBe("page-scan.png");
@@ -156,6 +161,13 @@ test("runs the bundled OCR engine without an external request", async ({
timeout: 90_000,
});
await expect(page.getByLabel("Recognized text")).toContainText(/LOCAL|SCAN/u);
await expect(page.getByLabel(/positioned OCR words/u)).toBeVisible();
await expect(
page.getByRole("button", { name: "Download hOCR geometry" }),
).toBeVisible();
await expect(
page.getByRole("button", { name: "Download OCR TSV" }),
).toBeVisible();
expect(external).toEqual([]);
});
@@ -191,8 +203,12 @@ test("integrates help, themes, identity, headers and offline reload", async ({
);
await expect(manifest.json()).resolves.toMatchObject({
id: "de.add-ideas.scan-tools",
version: "0.1.0",
requirements: { workers: true },
version: "0.2.0",
requirements: { workers: false },
capabilities: {
required: [],
optional: expect.arrayContaining(["workers"]),
},
privacy: { processing: "local", telemetry: false },
});
await context.setOffline(true);
+18
View File
@@ -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/scan-tools/");
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);
});