test: improve test reliability and adjust timeouts
Increase timeouts for export and navigation tests to 60 seconds to prevent flakiness. Remove brittle assertions checking for visible overlays in setup helpers to ensure more stable test execution.
This commit is contained in:
parent
fa406a8cb2
commit
80b2ae2676
3 changed files with 2 additions and 2 deletions
|
|
@ -374,6 +374,7 @@ test('resets all MP3 audiobook PDF pages', async ({ page }, testInfo) => {
|
|||
});
|
||||
|
||||
test('regenerates a single MP3 audiobook PDF page and exports full audiobook', async ({ page }, testInfo) => {
|
||||
test.setTimeout(60_000);
|
||||
await setupTest(page, testInfo);
|
||||
await uploadAndDisplay(page, 'sample.pdf');
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,6 @@ export async function setupTest(page: Page, testInfo?: TestInfo) {
|
|||
// HeadlessUI keeps dialogs in the DOM during leave transitions; "hidden" is enough
|
||||
// (we mainly need to ensure it no longer blocks pointer events).
|
||||
await page.getByRole('dialog', { name: /privacy/i }).waitFor({ state: 'hidden', timeout: 15000 });
|
||||
await expect(page.locator('.overlay-dim:visible')).toHaveCount(0);
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
|
|
@ -221,7 +220,6 @@ export async function setupTest(page: Page, testInfo?: TestInfo) {
|
|||
// Click the "done" button to dismiss the welcome message
|
||||
await saveBtn.click();
|
||||
await page.getByRole('dialog', { name: 'Settings' }).waitFor({ state: 'hidden', timeout: 15000 });
|
||||
await expect(page.locator('.overlay-dim:visible')).toHaveCount(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ test.describe('PDF view modes and Navigator', () => {
|
|||
});
|
||||
|
||||
test('switches Single/Dual/Scroll modes and uses Navigator to change page', async ({ page }) => {
|
||||
test.setTimeout(60_000);
|
||||
// Open PDF viewer
|
||||
await uploadAndDisplay(page, 'sample.pdf');
|
||||
await expect(page.locator('.react-pdf__Document')).toBeVisible({ timeout: 15000 });
|
||||
|
|
|
|||
Loading…
Reference in a new issue