aboutsummaryrefslogtreecommitdiffstats
path: root/frontend-vanilla/src/main.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend-vanilla/src/main.test.ts')
-rw-r--r--frontend-vanilla/src/main.test.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/frontend-vanilla/src/main.test.ts b/frontend-vanilla/src/main.test.ts
index aa0568b..d5681b8 100644
--- a/frontend-vanilla/src/main.test.ts
+++ b/frontend-vanilla/src/main.test.ts
@@ -246,4 +246,12 @@ describe('main application logic', () => {
window.dispatchEvent(new KeyboardEvent('keydown', { key: '/' }));
expect(spy).toHaveBeenCalled();
});
+
+ it('should handle sidebar toggle', () => {
+ renderLayout();
+ const toggleBtn = document.getElementById('sidebar-toggle-btn') as HTMLElement;
+ const initialVisible = store.sidebarVisible;
+ toggleBtn.click();
+ expect(store.sidebarVisible).toBe(!initialVisible);
+ });
});