From dbd202569f397ef67811a7ca75a0c13000e5d049 Mon Sep 17 00:00:00 2001 From: Richard R Date: Mon, 6 Apr 2026 10:34:59 -0600 Subject: [PATCH] undo(tests): Undo bad changes to tests/helpers.ts suggested by CodeRabbit.ai --- tests/helpers.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/helpers.ts b/tests/helpers.ts index 21270a9..65a5b19 100644 --- a/tests/helpers.ts +++ b/tests/helpers.ts @@ -95,6 +95,8 @@ export async function uploadAndDisplay(page: Page, fileName: string) { break; } catch (error) { if (attempt === 2) throw error; + const message = String(error); + if (!message.includes('intercepts pointer events')) throw error; await page.waitForTimeout(200); } } @@ -116,18 +118,15 @@ async function dismissSettingsModalIfVisible(page: Page): Promise { const saveBtn = settingsDialog.getByRole('button', { name: 'Save' }); const saveVisible = await saveBtn.isVisible().catch(() => false); if (saveVisible) { - const saveEnabled = await saveBtn.isEnabled(); - if (saveEnabled) { - await saveBtn.focus(); - await page.keyboard.press('Enter'); - } else { - await page.keyboard.press('Escape'); - } + await expect(saveBtn).toBeEnabled({ timeout: 10000 }).catch(() => { }); + await saveBtn.click({ force: true }).catch(async () => { + await page.keyboard.press('Escape').catch(() => { }); + }); } else { - await page.keyboard.press('Escape'); + await page.keyboard.press('Escape').catch(() => { }); } - await settingsDialog.waitFor({ state: 'hidden', timeout: 15000 }); + await settingsDialog.waitFor({ state: 'hidden', timeout: 15000 }).catch(() => { }); } /**