mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
test: add e2e tests for edit-metadata tool
This commit is contained in:
@@ -12,6 +12,7 @@ const TOOLS_WITH_DROPZONE = [
|
||||
{ id: "convert", name: "Convert" },
|
||||
{ id: "compress", name: "Compress" },
|
||||
{ id: "strip-metadata", name: "Strip Metadata" },
|
||||
{ id: "edit-metadata", name: "Edit Metadata" },
|
||||
{ id: "bulk-rename", name: "Bulk Rename" },
|
||||
{ id: "image-to-pdf", name: "Image to PDF" },
|
||||
{ id: "favicon", name: "Favicon" },
|
||||
|
||||
@@ -89,6 +89,23 @@ test.describe("Tool processing (core tools)", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("edit-metadata processes image", async ({ loggedInPage: page }) => {
|
||||
await page.goto("/edit-metadata");
|
||||
await uploadTestImage(page);
|
||||
|
||||
// Wait for inspect to complete and form to populate
|
||||
await page.waitForSelector('[id="em-artist"]', { timeout: 10_000 });
|
||||
|
||||
// Edit the artist field
|
||||
await page.fill('[id="em-artist"]', "E2E Test Artist");
|
||||
|
||||
await page.getByRole("button", { name: /apply metadata/i }).click();
|
||||
await waitForProcessing(page);
|
||||
await expect(page.getByRole("link", { name: /download/i }).first()).toBeVisible({
|
||||
timeout: 15_000,
|
||||
});
|
||||
});
|
||||
|
||||
test("brightness-contrast processes image", async ({ loggedInPage: page }) => {
|
||||
await page.goto("/brightness-contrast");
|
||||
await uploadTestImage(page);
|
||||
|
||||
Reference in New Issue
Block a user