From 1f008d9bcbe540e763d69da09f404c9f2368252a Mon Sep 17 00:00:00 2001 From: SnapOtter Date: Mon, 11 May 2026 21:37:19 +0800 Subject: [PATCH] test: add E2E smoke tests for URL import UI --- tests/e2e/url-import.spec.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/e2e/url-import.spec.ts diff --git a/tests/e2e/url-import.spec.ts b/tests/e2e/url-import.spec.ts new file mode 100644 index 00000000..3dc72c76 --- /dev/null +++ b/tests/e2e/url-import.spec.ts @@ -0,0 +1,25 @@ +import { expect, test } from "./helpers"; + +test.describe("URL Image Import", () => { + test("inline URL input is visible on tool page", async ({ loggedInPage: page }) => { + await page.goto("/resize"); + + await expect(page.getByPlaceholder("Paste image URL...")).toBeVisible(); + }); + + test("bulk import modal opens and closes", async ({ loggedInPage: page }) => { + await page.goto("/resize"); + + // Open the bulk import modal + await page.getByText("Import multiple URLs...").click(); + + // Assert the modal title is visible + await expect(page.getByText("Import from URLs")).toBeVisible(); + + // Close the modal via Cancel + await page.getByRole("button", { name: "Cancel" }).click(); + + // Assert the modal title is no longer visible + await expect(page.getByText("Import from URLs")).not.toBeVisible(); + }); +});