mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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:
@@ -11,8 +11,8 @@ test.describe("PDF to Image tool", () => {
|
|||||||
const fileInput = page.locator("input[type='file'][accept='application/pdf']");
|
const fileInput = page.locator("input[type='file'][accept='application/pdf']");
|
||||||
await fileInput.setInputFiles(PDF_FIXTURE);
|
await fileInput.setInputFiles(PDF_FIXTURE);
|
||||||
|
|
||||||
// Wait for page count to appear
|
// Wait for page count to appear in the file info area
|
||||||
await expect(page.getByText("3 pages")).toBeVisible({ timeout: 10_000 });
|
await expect(page.locator(".bg-muted").getByText("3 pages")).toBeVisible({ timeout: 10_000 });
|
||||||
|
|
||||||
// Set pages to just page 1 for a single-image response
|
// Set pages to just page 1 for a single-image response
|
||||||
await page.fill("#pdf-pages", "1");
|
await page.fill("#pdf-pages", "1");
|
||||||
|
|||||||
Reference in New Issue
Block a user