Skip to content

Commit 064efb2

Browse files
author
Aurtech
committed
test(e2e): target the full-resolution toggle by accessible name
The export panel reuses the olv-export-fullres-box / -hint classes across the full-res, compress, and classification option rows, so the class matches three elements and Playwright's strict mode failed. Locate the checkbox by its accessible name and filter the hint by text instead.
1 parent 914ad58 commit 064efb2

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/e2e/exportPanel.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ test('after a scan loads, the Export panel offers formats and exports a file', a
2323
await expect(panel.locator('.olv-bc-pill', { hasText: 'LAZ' })).toBeDisabled();
2424

2525
// Full-resolution toggle is present. The small test grid isn't reduced, so
26-
// the box is disabled with an honest "already full resolution" note.
27-
await expect(panel.locator('.olv-export-fullres-box')).toBeVisible();
28-
await expect(panel.locator('.olv-export-fullres-hint')).toContainText(/full resolution/i);
26+
// the box is disabled with an honest "already full resolution" note. Target it
27+
// by accessible name — the export panel reuses the `olv-export-fullres-*`
28+
// classes across the full-res / compress / classification option rows.
29+
await expect(panel.getByRole('checkbox', { name: 'Convert at full resolution' })).toBeVisible();
30+
await expect(panel.locator('.olv-export-fullres-hint', { hasText: /full resolution/i })).toBeVisible();
2931

3032
// Pick XYZ (small text output) and export → a download fires.
3133
await panel.locator('.olv-bc-pill', { hasText: 'XYZ' }).click();

0 commit comments

Comments
 (0)