test: Add comprehensive regression tests for Issue #259 Lockdown Mode fix#262
Open
test: Add comprehensive regression tests for Issue #259 Lockdown Mode fix#262
Conversation
Adds comprehensive regression tests to prevent reverting Link components back to onClick handlers on non-interactive elements. Unit Tests (11 tests): - Verify gallery items are Link elements (semantic <a> tags) - Verify href attributes exist for native navigation - Verify no role="button" on articles/divs - Verify JavaScript-free navigation works - Verify cross-platform consistency E2E Tests (7 scenarios): - Simulate Lockdown Mode (JavaScript disabled) - Verify strict browser security compatibility - Test keyboard accessibility - Validate SEO/crawlability with proper links These tests will catch if anyone accidentally reverts to the broken pattern that caused iOS Lockdown Mode and desktop browser security issues (Issue #259). Related: #259, #260
🎯 Performance Budget SummaryBundle Size Analysis
Lighthouse Performance ValidationDesktop Results
Mobile Results
Performance Budget Status
Next Steps
Generated at $(date) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Adds comprehensive regression tests to prevent reverting the Lockdown Mode fix (Issue #259, PR #260).
These tests will fail if anyone accidentally reverts Link components back to onClick handlers on non-interactive elements.
What These Tests Catch
Unit Tests (11 tests) ✅
File:
tests/regression/gallery-lockdown-mode.test.tsxVerifies that gallery items:
<a>tags), NOT divs/articles with onClickhrefattributes for native navigationrole="button"on non-interactive elementsE2E Tests (7 scenarios)
File:
tests/e2e/lockdown-mode-simulation.spec.tsSimulates real-world scenarios:
<a>tags withhrefWhy This Matters
Issue #259 was caused by using onClick handlers on non-interactive elements:
Without these tests, someone could accidentally revert to the broken pattern during refactoring, causing:
Test Results
Unit Tests
All 11 tests passing ✅
Test Coverage
Related
Deployment
These tests should be run in CI to catch regressions before they reach production.