2026-05-11 21:37:19 +08:00
|
|
|
import { expect, test } from "./helpers";
|
|
|
|
|
|
|
|
|
|
test.describe("URL Image Import", () => {
|
|
|
|
|
test("inline URL input is visible on tool page", async ({ loggedInPage: page }) => {
|
2026-06-24 20:19:37 +08:00
|
|
|
await page.goto("/image/resize");
|
2026-05-11 21:37:19 +08:00
|
|
|
|
2026-06-28 18:57:53 +08:00
|
|
|
await expect(page.getByPlaceholder("Paste file URL...")).toBeVisible();
|
2026-05-11 21:37:19 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test("bulk import modal opens and closes", async ({ loggedInPage: page }) => {
|
2026-06-24 20:19:37 +08:00
|
|
|
await page.goto("/image/resize");
|
2026-05-11 21:37:19 +08:00
|
|
|
|
|
|
|
|
// 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();
|
|
|
|
|
});
|
|
|
|
|
});
|