From cd094768580e967331863394336ad81249df11a7 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 18 Aug 2026 12:42:40 +0000 Subject: [PATCH] test(finder): wait for the dialog before keying into it The close-shortcut test sent its second keystroke as soon as the input was visible, which is before a dialog with a focus trap has settled. Waiting for focus instead asserts the same behaviour against a dialog that is actually ready to receive it. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01DzALEq9gGWwFmwTdgAiFcY --- e2e/tests/features/209-rundown-shortcuts.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2e/tests/features/209-rundown-shortcuts.spec.ts b/e2e/tests/features/209-rundown-shortcuts.spec.ts index e84b6b01f..388e587c1 100644 --- a/e2e/tests/features/209-rundown-shortcuts.spec.ts +++ b/e2e/tests/features/209-rundown-shortcuts.spec.ts @@ -238,7 +238,9 @@ test('Close finder with the search shortcut', async ({ page }) => { await expect(page.getByTestId('panel-rundown')).toBeVisible(); await page.keyboard.press('ControlOrMeta+f'); - await expect(page.getByPlaceholder('Search...')).toBeVisible(); + // waiting for focus rather than visibility, so the dialog has finished opening + // before the next keystroke is sent + await expect(page.getByPlaceholder('Search...')).toBeFocused(); // the shortcut has to close the finder while the caret is in the search field await page.getByPlaceholder('Search...').press('ControlOrMeta+f');