CI/CD: Refresh Frontend Test Suites #1056
Open
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.
closes #889
Description
Addressing the need for a reliable, modern testing baseline for the frontend. This PR introduces a layered testing strategy, adds sanity tests for core pages (Home, Settings), and modernizes the testing infrastructure to be robust and leak-free.
Changes
Infrastructure
src/test-utils.tsxwith acustomRenderfunction that wraps components in Redux, Router, and Theme providers.src/app/store.tsand test utils to create a fresh Redux store for every test run. prevents state leakage.New Tests
Sidebar.test.tsx: Verifies that the sidebar renders and contains all critical navigation links (Home, Tagging, Settings, etc.).PageSanity.test.tsx:await findByTextto gracefully handle async loading states.Checklist
Summary by CodeRabbit
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.