mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 00:02:56 +00:00
fix e2e create menu races
This commit is contained in:
@@ -49,7 +49,9 @@ function SidebarCreateMenu({
|
||||
// Why: the tour highlights this trigger, so the handoff has to fire from the
|
||||
// menu item rather than the button that now only opens the menu.
|
||||
const handleCreateWorkspace = useCallback(() => {
|
||||
openWorkspaceCreationComposerWithTourHandoff()
|
||||
// Why: opening after Radix tears down the menu prevents its focus restoration
|
||||
// from treating the new dialog as an outside interaction.
|
||||
window.setTimeout(openWorkspaceCreationComposerWithTourHandoff, 0)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
|
||||
@@ -459,7 +459,7 @@ test.describe('Create Workspace', () => {
|
||||
// portaled outside the dialog element, so locate it page-wide.
|
||||
const suggestion = orcaPage.getByRole('option', { name: linkedWorkspacePattern })
|
||||
await expect(suggestion).toBeVisible()
|
||||
await suggestion.click()
|
||||
await orcaPage.keyboard.press('Enter')
|
||||
|
||||
const createButton = dialog.getByRole('button', { name: /Create (Workspace|Worktree)/i })
|
||||
await expect(createButton).toBeEnabled()
|
||||
|
||||
Reference in New Issue
Block a user