diff --git a/tests/e2e/helpers/hidden-electron-compositor.ts b/tests/e2e/helpers/hidden-electron-compositor.ts index b2cb495e68b..2d3d6411846 100644 --- a/tests/e2e/helpers/hidden-electron-compositor.ts +++ b/tests/e2e/helpers/hidden-electron-compositor.ts @@ -4,6 +4,11 @@ export async function enableHiddenElectronCompositor(app: ElectronApplication): await app.evaluate(({ BrowserWindow }) => { if (process.env.ORCA_E2E_HEADLESS === '1' && process.env.ORCA_E2E_HEADFUL !== '1') { for (const window of BrowserWindow.getAllWindows()) { + const original = window.webContents.setBackgroundThrottling.bind(window.webContents) + window.webContents.setBackgroundThrottling = (allowed) => { + console.info('[hidden-throttle-change] ' + JSON.stringify({ allowed, stack: new Error().stack })) + original(allowed) + } window.webContents.setBackgroundThrottling(false) } } diff --git a/tests/e2e/helpers/ssh-config-host-picker.ts b/tests/e2e/helpers/ssh-config-host-picker.ts index 502a6fd050f..048be41d584 100644 --- a/tests/e2e/helpers/ssh-config-host-picker.ts +++ b/tests/e2e/helpers/ssh-config-host-picker.ts @@ -98,7 +98,18 @@ export async function closeOpenDialogs(page: Page): Promise { } const cancel = dialog.getByRole('button', { name: 'Cancel', exact: true }) await ((await cancel.isVisible()) ? cancel.click() : page.keyboard.press('Escape')) - await expect(dialog).toBeHidden({ timeout: 3_000 }) + try { + await expect(dialog).toBeHidden({ timeout: 3_000 }) + } catch (error) { + console.info('[dialog-exit-diagnostic] ' + JSON.stringify(await dialog.evaluate((element) => ({ + state: element.getAttribute('data-state'), + visibility: document.visibilityState, + animations: element.getAnimations().map((animation) => ({ + playState: animation.playState, currentTime: animation.currentTime, pending: animation.pending + })) + })))) + throw error + } } await expect(page.getByRole('dialog')).toHaveCount(0, { timeout: 3_000 }) }