The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 05:30 UTC
test(web): the right panel Escape test waits for focus to return (#21030)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 17, 2026 at 16:03 UTC
96ff44e124711e772111d0a88056985bf8536cf2
1 file changed
+5
-2
apps/web/src/components/RightPanelTabs.keyboard.browser.test.tsx
+5
-2
@@ -181,8 +181,11 @@ describe("right panel new-tab shortcut", () => {
181
expect(document.querySelector('[role="menu"]')).not.toBeNull();
182
await press("Escape");
183
expect(document.querySelector('[role="menu"]:not([data-closed])')).toBeNull();
184
- expect(document.activeElement).toBe(
185
- container.querySelector('[aria-label="Add panel surface"]'),
184
+ // The menu hands focus back to its trigger once its close finishes, which can land a frame later.
185
+ await vi.waitFor(() =>
186
+ expect(document.activeElement).toBe(
187
+ container.querySelector('[aria-label="Add panel surface"]'),
188
+ ),
189
);
190
input.remove();
191
});