📌 Description
src/pages/PendingValidations.tsx is the verifier's working queue. It sorts
pending tasks by daysRemaining and toggles between ascending/descending
urgency, reads from the Zustand useVerifierStore, and navigates into
ValidationDetail. It has no test file, so the sort toggle, empty-queue
state, and row navigation are untested.
This issue adds RTL coverage for the pending validations queue.
Goal: test the urgency sort toggle, empty state, and row-to-detail
navigation with the store mocked.
🎯 Requirements and Context
- Mock
useVerifierStore (src/Zustand/Store.ts) to supply a set of
ValidationTasks with varied daysRemaining.
- Assert default sort order, that toggling reverses it, and that the toggle label
updates (High to Low ↔ Low to High).
- Assert the "All caught up!" empty state when there are no pending validations.
- Assert clicking a row navigates to the corresponding
ValidationDetail route.
🛠️ Suggested Execution
1. Create a branch
git checkout -b feature/test-pending-validations
2. Implement changes
- Tests: add
src/pages/__tests__/PendingValidations.test.tsx using RTL,
MemoryRouter, and a mocked store + useNavigate.
3. Test and commit
- Run
npm run test from the repo root.
- Cover edge cases: empty queue, single task, ties in
daysRemaining, toggle
twice returns to original order.
Example commit message
test: add RTL coverage for PendingValidations queue
✅ Guidelines
- Minimum 95% test coverage on
PendingValidations.tsx.
- Clear, behavior-focused test names.
- Timeframe: 96 hours.
🏷️ Labels
type-testing · area-frontend · MAYBE REWARDED · GRANTFOX OSS ·
OFFICIAL CAMPAIGN
💬 Community & Support
- Join the Disciplr contributor Discord to coordinate and get unblocked fast:
https://discord.gg/xvNAvMJf
- Please introduce yourself before you start so we can avoid duplicate work.
📌 Description
src/pages/PendingValidations.tsxis the verifier's working queue. It sortspending tasks by
daysRemainingand toggles between ascending/descendingurgency, reads from the Zustand
useVerifierStore, and navigates intoValidationDetail. It has no test file, so the sort toggle, empty-queuestate, and row navigation are untested.
This issue adds RTL coverage for the pending validations queue.
🎯 Requirements and Context
useVerifierStore(src/Zustand/Store.ts) to supply a set ofValidationTasks with varieddaysRemaining.updates (
High to Low↔Low to High).ValidationDetailroute.🛠️ Suggested Execution
1. Create a branch
2. Implement changes
src/pages/__tests__/PendingValidations.test.tsxusing RTL,MemoryRouter, and a mocked store +useNavigate.3. Test and commit
npm run testfrom the repo root.daysRemaining, toggletwice returns to original order.
Example commit message
✅ Guidelines
PendingValidations.tsx.🏷️ Labels
type-testing·area-frontend·MAYBE REWARDED·GRANTFOX OSS·OFFICIAL CAMPAIGN💬 Community & Support
https://discord.gg/xvNAvMJf