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.
This commit is contained in:
Siddharth Kumar Sah
2026-04-10 20:56:13 +08:00
parent cab6772dab
commit b2a2c890a1
+2 -2
View File
@@ -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");