Skip to content

Commit 803afb6

Browse files
committed
test(studio): a click during a search does not change the group the author left open
Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 453b097 commit 803afb6

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎ui/packages/app-shell/src/views/studio-design/StudioMenu.test.tsx‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,16 @@ describe('drawn as the app\'s menu (objectstack#37452)', () => {
551551
expect(chevron()).not.toHaveClass('rotate-90');
552552
});
553553

554+
it('a click on an open group\'s label during a search is not taken: the group is still open once the search is cleared', () => {
555+
renderAt('/studio/~all/metadata', '~all');
556+
fireEvent.change(screen.getByTestId('studio-menu-search'), { target: { value: 'position' } });
557+
fireEvent.click(groupLabel('studio-menu-group-security'));
558+
expect(groupLabel('studio-menu-group-security')).toHaveAttribute('aria-expanded', 'true');
559+
fireEvent.change(screen.getByTestId('studio-menu-search'), { target: { value: '' } });
560+
expect(groupLabel('studio-menu-group-security')).toHaveAttribute('aria-expanded', 'true');
561+
expect(entry('type:position')).toBeVisible();
562+
});
563+
554564
it('in the phone drawer a group\'s label is the app menu\'s 44 px tap target; CONTROL: docked it is not', async () => {
555565
setWidth(390);
556566
renderAt(`/studio/${PKG}/data`);

0 commit comments

Comments
 (0)