diff --git a/packages/app/e2e/helpers/archive-tab.ts b/packages/app/e2e/helpers/archive-tab.ts index 8ff339c1f..0e96d42e9 100644 --- a/packages/app/e2e/helpers/archive-tab.ts +++ b/packages/app/e2e/helpers/archive-tab.ts @@ -188,6 +188,11 @@ 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, + }); await waitForWorkspaceTabsVisible(page); await expectWorkspaceTabVisible(page, agent.id); } diff --git a/packages/app/e2e/launcher-tab.spec.ts b/packages/app/e2e/launcher-tab.spec.ts index 07074db9c..fd9fcec65 100644 --- a/packages/app/e2e/launcher-tab.spec.ts +++ b/packages/app/e2e/launcher-tab.spec.ts @@ -67,6 +67,8 @@ test.describe("Tab creation", () => { .toBe(countBefore + 1); const countAfterFirst = await countTabsOfKind(page, "draft"); + // Blur the composer so the second shortcut isn't swallowed by the focused input + await page.evaluate(() => (document.activeElement as HTMLElement)?.blur?.()); await pressNewTabShortcut(page); await expect .poll(() => countTabsOfKind(page, "draft"), { timeout: 15_000 }) diff --git a/packages/app/e2e/new-workspace.spec.ts b/packages/app/e2e/new-workspace.spec.ts index 5bdb11d03..588e81e19 100644 --- a/packages/app/e2e/new-workspace.spec.ts +++ b/packages/app/e2e/new-workspace.spec.ts @@ -65,7 +65,7 @@ test.describe("New workspace flow", () => { }); await expectWorkspaceHeader(page, { title: firstWorkspace.workspaceName, - subtitle: workspaceLabelFromPath(firstRepo.path), + subtitle: firstWorkspace.projectDisplayName, }); await switchWorkspaceViaSidebar({ @@ -79,7 +79,7 @@ test.describe("New workspace flow", () => { }); await expectWorkspaceHeader(page, { title: secondWorkspace.workspaceName, - subtitle: workspaceLabelFromPath(secondRepo.path), + subtitle: secondWorkspace.projectDisplayName, }); await switchWorkspaceViaSidebar({ @@ -89,7 +89,7 @@ test.describe("New workspace flow", () => { }); await expectWorkspaceHeader(page, { title: firstWorkspace.workspaceName, - subtitle: workspaceLabelFromPath(firstRepo.path), + subtitle: firstWorkspace.projectDisplayName, }); } finally { await secondRepo.cleanup(); @@ -119,7 +119,7 @@ test.describe("New workspace flow", () => { }); await expectWorkspaceHeader(page, { title: openedProject.workspaceName, - subtitle: workspaceLabelFromPath(tempRepo.path), + subtitle: openedProject.projectDisplayName, }); await clickNewWorkspaceButton(page, { diff --git a/packages/app/e2e/workspace-setup-streaming.spec.ts b/packages/app/e2e/workspace-setup-streaming.spec.ts index 288d33ec1..0d39db2cb 100644 --- a/packages/app/e2e/workspace-setup-streaming.spec.ts +++ b/packages/app/e2e/workspace-setup-streaming.spec.ts @@ -226,6 +226,7 @@ test.describe("Workspace setup streaming", () => { }); test("launches script terminals after setup completes", async ({ page }) => { + test.setTimeout(90_000); const client = await connectWorkspaceSetupClient(); const repo = await createTempGitRepo("setup-svc-ui-", { paseoConfig: { @@ -272,9 +273,11 @@ test.describe("Workspace setup streaming", () => { // Verify the terminal surface rendered await expect(page.getByTestId("terminal-surface").first()).toBeVisible({ timeout: 10_000 }); - // Verify the terminal output contains "listening on" (xterm renders text in .xterm-rows) + // Verify the terminal output contains "listening on" (xterm renders text in .xterm-rows). + // The script is spawned after setup completes and needs time for the shell to start, + // the command to be typed, and Node to boot the HTTP server. Give extra time on CI. await expect(page.locator(".xterm-rows").first()).toContainText("listening on", { - timeout: 30_000, + timeout: 60_000, }); } finally { await client.close();