test(pdf-upload): update assertions for PDF viewer heading and page navigation
Replace text-based assertion for PDF title with role-based heading check and add assertion for visible page navigation button. Improves test robustness against UI changes and ensures accessibility compliance.
This commit is contained in:
parent
84c3b22e5a
commit
8439216dd8
1 changed files with 2 additions and 1 deletions
|
|
@ -77,7 +77,8 @@ test.describe('Document Upload Tests', () => {
|
|||
await expectViewerForFile(page, 'sample.pdf');
|
||||
// Additional content checks specific to the sample PDF
|
||||
await expect(page.locator('.react-pdf__Page')).toBeVisible();
|
||||
await expect(page.getByText('Sample PDF')).toBeVisible();
|
||||
await expect(page.getByRole('heading', { level: 1, name: 'sample.pdf' })).toBeVisible();
|
||||
await expect(page.getByRole('button', { name: /1\s*\/\s*2/ })).toBeVisible();
|
||||
});
|
||||
|
||||
test('displays an EPUB document', async ({ page }) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue