Skip to content

Commit eebb750

Browse files
committed
test(app-shell): a menu the keyboard opens from the float holds it
Claude-Session: https://claude.ai/code/session_01JQwxbWjfzbfpWXFKqr1sFF Co-authored-by: Claude <noreply@anthropic.com>
1 parent 83958e1 commit eebb750

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎ui/packages/app-shell/src/layout/__tests__/UnifiedSidebar.hiddenCollapse-35062.test.tsx‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,16 @@ describe('a menu opened from the float keeps it out (objectstack#36471)', () =>
875875
expect(screen.getByTestId('sidebar-app-menu')).toBeInTheDocument();
876876
});
877877

878+
it('a menu opened from the float with no press in it (the keyboard) holds the float when the moment is up', () => {
879+
floatThenPointerAway();
880+
fireEvent.keyDown(within(panel()).getByTestId('sidebar-app-menu-trigger'), { key: 'Enter' });
881+
expect(screen.getByTestId('sidebar-app-menu')).toBeInTheDocument();
882+
act(() => {
883+
vi.advanceTimersByTime(SIDEBAR_FLOAT_CLOSE_DELAY_MS * 3);
884+
});
885+
expectFloat();
886+
});
887+
878888
it('a press in the float stops the fold’s clock; a later move away starts it again', () => {
879889
floatThenPointerAway();
880890
fireEvent.pointerDown(within(panel()).getByRole('link', { name: 'Contacts' }), { button: 0, pointerType: 'mouse' });

0 commit comments

Comments
 (0)