test(gui): cover the tooltip primitive and the inert expanded search control

This commit is contained in:
Yif
2026-07-23 17:08:47 +08:00
parent 20720ef238
commit 789e9daaf6
2 changed files with 103 additions and 0 deletions

View File

@@ -197,6 +197,9 @@ describe('SidebarRoot', () => {
vi.useFakeTimers()
try {
const { onToggleSidebar } = mount(...projectData())
// While expanded the search control is inert (the row click focuses instead).
act(() => { fireEvent.click(screen.getByLabelText('Search sessions')) })
expect(onToggleSidebar).not.toHaveBeenCalled()
act(() => { fireEvent.click(screen.getByLabelText('Collapse sidebar')) })
act(() => { vi.advanceTimersByTime(300) })
act(() => { fireEvent.click(screen.getByLabelText('Search sessions')) })