@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user