From b2a2c890a1d25f60e392e6a2df23e1600cc3ad8d Mon Sep 17 00:00:00 2001 From: Siddharth Kumar Sah Date: Sun, 5 Apr 2026 23:44:37 +0800 Subject: [PATCH] fix: use specific selector in pdf-to-image e2e test The getByText("3 pages") matched multiple elements including the convert button. Scope the selector to the file info area. --- tests/e2e/pdf-to-image.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/pdf-to-image.spec.ts b/tests/e2e/pdf-to-image.spec.ts index 5999f30a..45149717 100644 --- a/tests/e2e/pdf-to-image.spec.ts +++ b/tests/e2e/pdf-to-image.spec.ts @@ -11,8 +11,8 @@ test.describe("PDF to Image tool", () => { const fileInput = page.locator("input[type='file'][accept='application/pdf']"); await fileInput.setInputFiles(PDF_FIXTURE); - // Wait for page count to appear - await expect(page.getByText("3 pages")).toBeVisible({ timeout: 10_000 }); + // Wait for page count to appear in the file info area + await expect(page.locator(".bg-muted").getByText("3 pages")).toBeVisible({ timeout: 10_000 }); // Set pages to just page 1 for a single-image response await page.fill("#pdf-pages", "1");