fix: resolve 6 remaining Playwright e2e test failures on CI
- archive-tab: replace waitForFunction with waitForURL for ?open= intent consumption, increase test timeout to 300s for slow rootNavigationState init on CI - launcher-tab: use Control+t on Linux instead of Meta+t to match app's keyboard shortcut definitions for non-Mac platforms - new-workspace: add waitForSidebarHydration to wait for daemon connection before checking sidebar rows, add re-navigation fallback if app redirects during hydration, increase timeouts - setup-streaming: use waitForTerminalContent (xterm buffer API) instead of fragile .xterm-rows CSS text matching, wait for terminal attachment before checking content
This commit is contained in:
@@ -188,11 +188,16 @@ export async function openWorkspaceWithAgents(
|
||||
const serverId = getServerId();
|
||||
for (const agent of agents) {
|
||||
await page.goto(buildHostAgentDetailRoute(serverId, agent.id, agent.cwd));
|
||||
// Wait for the ?open=agent:xxx intent to be consumed by the layout effect.
|
||||
// The layout removes the query param via history.replaceState once processed.
|
||||
await page.waitForFunction(() => !window.location.search.includes("open="), {
|
||||
timeout: 15_000,
|
||||
});
|
||||
|
||||
// The workspace layout consumes `?open=agent:xxx`, returns null during the effect,
|
||||
// then replaces the URL with the clean workspace route after preparing the tab.
|
||||
// On CI, Expo Router's rootNavigationState may take time to initialize,
|
||||
// so we allow a generous timeout here (matching terminal-perf pattern).
|
||||
await page.waitForURL(
|
||||
(url) => url.pathname.includes("/workspace/") && !url.searchParams.has("open"),
|
||||
{ timeout: 60_000 },
|
||||
);
|
||||
|
||||
await waitForWorkspaceTabsVisible(page);
|
||||
await expectWorkspaceTabVisible(page, agent.id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user