[BUG] Sidebar E2E Tests Failing - Keyboard Shortcut & Breakpoint State #17
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug Description
Two E2E tests related to sidebar functionality are consistently failing:
Failing Tests
Test 1: Keyboard Shortcut Toggle
File:
tests/e2e/layout.spec.ts:154Expected Behavior:
Pressing Ctrl+\ should toggle sidebar state between expanded and collapsed.
Actual Behavior:
Sidebar state remains "expanded" after keyboard shortcut. The test expects state to change but it doesn't.
Error:
Code:
Possible Cause:
Keyboard event listener may not be attached or the shortcut handler isn't updating the store properly.
Test 2: Breakpoint State Persistence
File:
tests/e2e/layout.spec.ts:135Expected Behavior:
Different viewport breakpoints should render sidebar in expected states:
Actual Behavior:
At lg breakpoint (1024px), sidebar is "expanded" but expected to be "collapsed".
Error:
Code:
Possible Cause:
Responsive initialization in Sidebar.svelte or layout store may not be applying breakpoint rules correctly on initial load.
Related Files
src/lib/components/layout/Sidebar.svelte- Sidebar componentsrc/lib/components/layout/AppLayout.svelte- Layout wrappersrc/lib/stores/layout.ts- Sidebar state managementtests/e2e/layout.spec.ts- Failing testsEnvironment
Run Tests
Screenshots Needed
headroom_sidebar_statevalue