Skip to content

Commit f2a9ebb

Browse files
test(app): wait for the composer hand-off before keyboard navigation in the inbox shelf test (#66807)
Co-authored-by: opencodejr[bot] <348916617+opencodejr[bot]@users.noreply.github.com>
1 parent 9dff0b8 commit f2a9ebb

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎packages/app/e2e/regression/tabs.spec.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2813,7 +2813,12 @@ test("a working session finishing in the inbox shelf leaves the list where it wa
28132813
await expect(recent).toHaveCount(12)
28142814
expect(await list.evaluate((element) => element.scrollHeight > element.clientHeight)).toBe(true)
28152815

2816-
// Open the first session, then move focus down the list to the working card without opening it.
2816+
// Open the first session, then move focus down the list to the working card without opening it. The card that
2817+
// opened the session hands focus to its composer once the session loads, so wait for that before going back to the
2818+
// list: otherwise the composer can take focus from the list partway through.
2819+
await recent.first().click()
2820+
await expectPath(page, sessionHref("ses_finish_read_00"))
2821+
await expect(page.locator('[data-component="composer-editor"]')).toBeFocused()
28172822
await recent.first().click()
28182823
await expectPath(page, sessionHref("ses_finish_read_00"))
28192824
await expect(recent.first()).toBeFocused()

0 commit comments

Comments
 (0)