test: add e2e tests for edit-metadata tool

This commit is contained in:
Siddharth Kumar Sah
2026-04-06 19:35:25 +08:00
parent 492eeb0f96
commit 7962887387
2 changed files with 18 additions and 0 deletions
+1
View File
@@ -12,6 +12,7 @@ const TOOLS_WITH_DROPZONE = [
{ id: "convert", name: "Convert" }, { id: "convert", name: "Convert" },
{ id: "compress", name: "Compress" }, { id: "compress", name: "Compress" },
{ id: "strip-metadata", name: "Strip Metadata" }, { id: "strip-metadata", name: "Strip Metadata" },
{ id: "edit-metadata", name: "Edit Metadata" },
{ id: "bulk-rename", name: "Bulk Rename" }, { id: "bulk-rename", name: "Bulk Rename" },
{ id: "image-to-pdf", name: "Image to PDF" }, { id: "image-to-pdf", name: "Image to PDF" },
{ id: "favicon", name: "Favicon" }, { id: "favicon", name: "Favicon" },
+17
View File
@@ -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 }) => { test("brightness-contrast processes image", async ({ loggedInPage: page }) => {
await page.goto("/brightness-contrast"); await page.goto("/brightness-contrast");
await uploadTestImage(page); await uploadTestImage(page);