1.8 KiB
1.8 KiB
Manual Testing for Toggle Issues
Issue 1: Scroll Jumping to Top
Test Steps:
- Open http://localhost:1999/?lang=en
- Scroll down 500px (or just scroll down a bit)
- Click any toggle (Theme, Length, or Logos)
- Expected: Scroll position stays the same
- Actual: Check if scroll jumps to top
Current Status:
- Theme toggle: Uses hyperscript (no HTMX), should not scroll but may have issue with label click
- Length toggle: Uses HTMX, scroll preservation implemented in main.js
- Logo toggle: Uses HTMX, scroll preservation implemented in main.js
Issue 2: Logo Toggle Not Syncing
Test Steps:
- Open http://localhost:1999/?lang=en in desktop view (>900px)
- Note the current state of desktop logo toggle (on/off)
- Resize window to mobile (<900px)
- Open hamburger menu
- Click mobile logo toggle
- Wait for HTMX to complete
- Close menu and resize back to desktop
- Expected: Desktop logo toggle matches the mobile toggle state
- Actual: Check if desktop toggle updated
Debug:
- Open browser console
- Look for:
Toggle sync - Logos: desktop=true/false, mobile=true/false - This will show if the sync code is running
Quick Test Commands:
Check if server is running:
curl -s 'http://localhost:1999/?lang=en' | grep -o 'id="themeToggle"' | head -1
Check scroll preservation code:
curl -s 'http://localhost:1999/?lang=en' | grep -A 5 'savedScrollPosition'
Check toggle sync code:
curl -s 'http://localhost:1999/?lang=en' | grep -A 3 'Toggle sync'
Expected Console Output:
When toggling logos, you should see:
Toggle sync - Logos: desktop=true, mobile=true
When toggling length, you should see:
Toggle sync - Length: desktop=true, mobile=true