test: add dark mode coverage for UI components#297
Open
MerlinTheWhiz wants to merge 1 commit into
Open
Conversation
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.
Summary
Add systematic dark mode coverage verification for all UI components. Previously only one component (
stream-status-badge.test.tsx) existed with no theme-switching tests. This PR adds a comprehensive test suite that renders every shadcn/ui component (50+) in both light and dark mode and asserts zeroconsole.errorcalls, catching contrast issues, invisible text, and missing borders in dark mode before they reach users.Changes:
app/lib/test-utils.tsx— reusablebuildThemeTest()helper that generates light + dark test casesuseIsMobilemock inapp/jest.setup.ts(required by sidebar component tests)app/components/ui/dark-mode-coverage.test.tsx— 134 test cases covering 50+ components in both themesnext-themesandembla-carousel-reactfor test isolationRelated issues
Closes #233
Type of change
Testing performed
All 182 tests pass (134 new + 48 existing):
Result: Test Suites: 12 passed, 12 total | Tests: 182 passed, 182 total
Screenshots (if applicable)
Checklist — author
origin/mainand resolved conflicts.npm run lint,npm run build,npm test.