From 0d9ac53fb04eca7b829aa3c54d04fd86f29d6e36 Mon Sep 17 00:00:00 2001 From: creatixchu Date: Tue, 28 Jul 2026 23:04:33 +0800 Subject: [PATCH] test(web): give the browse-dialog snapshot finds the lane's standard 10s timeout CI's cold jsdom needs more than findByRole's 1s default between opening the dialog and the fixture listing's first paint; the surrounding helpers already wait 10s. --- apps/web/tests/workspace-flow.snapshot.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/tests/workspace-flow.snapshot.ts b/apps/web/tests/workspace-flow.snapshot.ts index d7cb66e0af..e6efbd75ea 100644 --- a/apps/web/tests/workspace-flow.snapshot.ts +++ b/apps/web/tests/workspace-flow.snapshot.ts @@ -196,9 +196,9 @@ it('adopts a directory through the composed in-app browse flow and lands in its fireEvent.click(within(menu).getByRole('menuitem', { name: 'Open local folder…' })) // The browse occupant renders the Select Workspace Directory dialog at the // fixture home; select Documents, advance into project, and adopt it. - const dialog = await screen.findByRole('dialog', { name: '选择工作区目录' }) - fireEvent.click(await within(dialog).findByRole('listitem', { name: /Documents/ })) - fireEvent.click(await within(dialog).findByRole('listitem', { name: /^project/ })) + const dialog = await screen.findByRole('dialog', { name: '选择工作区目录' }, { timeout: 10_000 }) + fireEvent.click(await within(dialog).findByRole('listitem', { name: /Documents/ }, { timeout: 10_000 })) + fireEvent.click(await within(dialog).findByRole('listitem', { name: /^project/ }, { timeout: 10_000 })) fireEvent.click(within(dialog).getByRole('button', { name: '打开' })) await findHeroComposer() await waitFor(() => {