mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-19 22:53:08 +00:00
This reverts commit 583c3eb4a6.
This commit is contained in:
@@ -12,12 +12,9 @@ export async function navigateToBoard(page: Page): Promise<void> {
|
||||
// Authenticate before navigating
|
||||
await authenticateForTests(page);
|
||||
|
||||
// Wait for any pending navigation to complete before starting a new one
|
||||
await page.waitForLoadState('domcontentloaded').catch(() => {});
|
||||
await page.waitForTimeout(100);
|
||||
|
||||
// Navigate directly to /board route
|
||||
await page.goto('/board', { waitUntil: 'domcontentloaded' });
|
||||
await page.goto('/board');
|
||||
await page.waitForLoadState('load');
|
||||
|
||||
// Wait for splash screen to disappear (safety net)
|
||||
await waitForSplashScreenToDisappear(page, 3000);
|
||||
@@ -37,13 +34,9 @@ export async function navigateToContext(page: Page): Promise<void> {
|
||||
// Authenticate before navigating
|
||||
await authenticateForTests(page);
|
||||
|
||||
// Wait for any pending navigation to complete before starting a new one
|
||||
// This prevents race conditions, especially on mobile viewports
|
||||
await page.waitForLoadState('domcontentloaded').catch(() => {});
|
||||
await page.waitForTimeout(100);
|
||||
|
||||
// Navigate directly to /context route
|
||||
await page.goto('/context', { waitUntil: 'domcontentloaded' });
|
||||
await page.goto('/context');
|
||||
await page.waitForLoadState('load');
|
||||
|
||||
// Wait for splash screen to disappear (safety net)
|
||||
await waitForSplashScreenToDisappear(page, 3000);
|
||||
@@ -66,14 +59,6 @@ export async function navigateToContext(page: Page): Promise<void> {
|
||||
// Wait for the context view to be visible
|
||||
// Increase timeout to handle slower server startup
|
||||
await waitForElement(page, 'context-view', { timeout: 15000 });
|
||||
|
||||
// On mobile, close the sidebar if open so the header actions trigger is clickable (not covered by backdrop)
|
||||
// Use JavaScript click to avoid force:true hitting the sidebar (z-30) instead of the backdrop (z-20)
|
||||
const backdrop = page.locator('[data-testid="sidebar-backdrop"]');
|
||||
if (await backdrop.isVisible().catch(() => false)) {
|
||||
await backdrop.evaluate((el) => (el as HTMLElement).click());
|
||||
await page.waitForTimeout(200);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,12 +69,9 @@ export async function navigateToSpec(page: Page): Promise<void> {
|
||||
// Authenticate before navigating
|
||||
await authenticateForTests(page);
|
||||
|
||||
// Wait for any pending navigation to complete before starting a new one
|
||||
await page.waitForLoadState('domcontentloaded').catch(() => {});
|
||||
await page.waitForTimeout(100);
|
||||
|
||||
// Navigate directly to /spec route
|
||||
await page.goto('/spec', { waitUntil: 'domcontentloaded' });
|
||||
await page.goto('/spec');
|
||||
await page.waitForLoadState('load');
|
||||
|
||||
// Wait for splash screen to disappear (safety net)
|
||||
await waitForSplashScreenToDisappear(page, 3000);
|
||||
@@ -123,12 +105,9 @@ export async function navigateToAgent(page: Page): Promise<void> {
|
||||
// Authenticate before navigating
|
||||
await authenticateForTests(page);
|
||||
|
||||
// Wait for any pending navigation to complete before starting a new one
|
||||
await page.waitForLoadState('domcontentloaded').catch(() => {});
|
||||
await page.waitForTimeout(100);
|
||||
|
||||
// Navigate directly to /agent route
|
||||
await page.goto('/agent', { waitUntil: 'domcontentloaded' });
|
||||
await page.goto('/agent');
|
||||
await page.waitForLoadState('load');
|
||||
|
||||
// Wait for splash screen to disappear (safety net)
|
||||
await waitForSplashScreenToDisappear(page, 3000);
|
||||
|
||||
Reference in New Issue
Block a user