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.
This commit is contained in:
creatixchu
2026-07-28 23:04:33 +08:00
parent a19ea11cfd
commit 0d9ac53fb0

View File

@@ -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(() => {