Skip to content

Commit b89788f

Browse files
sebishogunclaude
andcommitted
fix(e2e): increase timeout for workspace item visibility in project switch test
The workspace-item element depends on an async chain (workspace creation -> project metadata sync -> parent project resolution -> sidebar re-render) that takes longer than the default 10s timeout on Linux CI. Use expect.poll with 60s timeout, consistent with other passing workspace tests. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 1121b46 commit b89788f

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

packages/app/e2e/projects/projects-switch.spec.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,20 @@ test("switching back to a project opens the latest workspace session", async ({
8282
workspaceDir = base64Decode(workspaceSlug)
8383
await openSidebar(page)
8484

85-
const workspace = page.locator(workspaceItemSelector(workspaceSlug)).first()
86-
await expect(workspace).toBeVisible()
87-
await workspace.hover()
85+
await expect
86+
.poll(
87+
async () => {
88+
const item = page.locator(workspaceItemSelector(workspaceSlug)).first()
89+
try {
90+
await item.hover({ timeout: 500 })
91+
return true
92+
} catch {
93+
return false
94+
}
95+
},
96+
{ timeout: 60_000 },
97+
)
98+
.toBe(true)
8899

89100
const newSession = page.locator(workspaceNewSessionSelector(workspaceSlug)).first()
90101
await expect(newSession).toBeVisible()

0 commit comments

Comments
 (0)