Skip to content

Commit 2ee79ca

Browse files
committed
test(org): resize the rail by key once Home's field has taken its load focus
The rail hydrates before Home, so the edge had focus for the first key and lost it to useChatInputFocus before the second, leaving the width where the first key put it.
1 parent 7503418 commit 2ee79ca

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • apps/sim/scripts/org-redesign-e2e/checks

‎apps/sim/scripts/org-redesign-e2e/checks/sidebar.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ export async function sidebarChecks() {
211211
const width = async () => Math.round((await sidebar(page).boundingBox())?.width ?? 0)
212212
const before = await width()
213213
await expect(edge).toHaveAttribute('aria-valuenow', String(before))
214+
// Home's field takes focus once it mounts, which is after the rail: this waits it out.
215+
await expect(composer(page)).toBeFocused()
214216
await edge.focus()
215217
await page.keyboard.press('ArrowRight')
216218
await expect.poll(width).toBe(before + 16)

0 commit comments

Comments
 (0)