()
| 17 | import loggedUser from '../../__tests__/fixture/loggedUser'; |
| 18 | |
| 19 | const SidebarState = () => { |
| 20 | const { sidebarExpanded, setSidebarForceCollapsed, toggleSidebarExpanded } = |
| 21 | useSettingsContext(); |
| 22 | |
| 23 | return ( |
| 24 | <> |
| 25 | <span>{sidebarExpanded ? 'expanded' : 'collapsed'}</span> |
| 26 | <button type="button" onClick={() => setSidebarForceCollapsed(true)}> |
| 27 | force |
| 28 | </button> |
| 29 | <button type="button" onClick={toggleSidebarExpanded}> |
| 30 | toggle |
| 31 | </button> |
| 32 | </> |
| 33 | ); |
| 34 | }; |
| 35 | |
| 36 | it('should collapse the sidebar for the page without writing the stored preference', async () => { |
| 37 | const updateSettings = jest.fn(); |
nothing calls this directly
no test coverage detected