mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 08:13:37 +00:00
feat: implement splash screen handling in navigation and interactions
- Added a new function `waitForSplashScreenToDisappear` to manage splash screen visibility, ensuring it does not block user interactions. - Integrated splash screen checks in various navigation functions and interaction methods to enhance user experience by waiting for the splash screen to disappear before proceeding. - Updated test setup to disable the splash screen during tests for consistent testing behavior.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Page, expect } from '@playwright/test';
|
||||
import { getByTestId, getButtonByText } from './elements';
|
||||
import { waitForSplashScreenToDisappear } from './waiting';
|
||||
|
||||
/**
|
||||
* Get the platform-specific modifier key (Meta for Mac, Control for Windows/Linux)
|
||||
@@ -21,6 +22,8 @@ export async function pressModifierEnter(page: Page): Promise<void> {
|
||||
* Click an element by its data-testid attribute
|
||||
*/
|
||||
export async function clickElement(page: Page, testId: string): Promise<void> {
|
||||
// Wait for splash screen to disappear first (safety net)
|
||||
await waitForSplashScreenToDisappear(page, 2000);
|
||||
const element = await getByTestId(page, testId);
|
||||
await element.click();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user