fix: E2E test stability and UI performance improvements (#823)

This commit is contained in:
gsxdsm
2026-03-02 18:46:28 -08:00
committed by GitHub
parent 1c3d6434a8
commit 54d69e907b
9 changed files with 88 additions and 21 deletions

View File

@@ -2,6 +2,27 @@ import { Page, Locator } from '@playwright/test';
import { clickElement } from '../core/interactions';
import { waitForElement, waitForElementHidden } from '../core/waiting';
/**
* Dismiss the sandbox warning dialog if it appears.
* This dialog blocks pointer events and must be accepted before interacting
* with elements behind it.
*/
export async function dismissSandboxWarningIfVisible(page: Page): Promise<void> {
const sandboxAcceptBtn = page.locator('button:has-text("I Accept the Risks")');
const sandboxVisible = await sandboxAcceptBtn
.waitFor({ state: 'visible', timeout: 2000 })
.then(() => true)
.catch(() => false);
if (sandboxVisible) {
await sandboxAcceptBtn.click();
await page
.locator('[role="dialog"][data-state="open"]')
.first()
.waitFor({ state: 'hidden', timeout: 3000 })
.catch(() => {});
}
}
/**
* Check if the add feature dialog is visible
*/