📌 Description
src/features/maintainers/components/pull-requests/PRFilterDropdown.tsx (has a test file already) likely shows a badge/count of currently active filters on its trigger button. There's no test confirming that count stays accurate as filters are added/removed, which is an easy thing to get subtly wrong (off-by-one, stale count after a rapid toggle).
🧩 Requirements and context
- Add a test asserting the badge count matches the number of active filters after adding one, adding several, and removing one.
- Add a test that the badge is hidden (or shows 0/none) when no filters are active.
- Add a test for rapid toggle sequences not leaving a stale count.
Non-functional requirements
- Must be secure, tested, and documented.
- Should be efficient and easy to review.
🛠️ Suggested execution
1. Fork the repo and create a branch
git checkout -b test/pr-filter-dropdown-count-badge
2. Implement changes
- Modify:
src/features/maintainers/components/pull-requests/PRFilterDropdown.test.tsx — add the count-accuracy cases.
3. Test and commit
npm test -- run PRFilterDropdown
- Cover edge cases: zero active filters, one filter, many filters, rapid add/remove toggling.
- Include test output and details in the PR description.
Example commit message
test: add active-filter count badge accuracy coverage for PRFilterDropdown
✅ Acceptance criteria
🔒 Security notes
None beyond standard correctness/regression risk.
📋 Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
📌 Description
src/features/maintainers/components/pull-requests/PRFilterDropdown.tsx(has a test file already) likely shows a badge/count of currently active filters on its trigger button. There's no test confirming that count stays accurate as filters are added/removed, which is an easy thing to get subtly wrong (off-by-one, stale count after a rapid toggle).🧩 Requirements and context
Non-functional requirements
🛠️ Suggested execution
1. Fork the repo and create a branch
2. Implement changes
src/features/maintainers/components/pull-requests/PRFilterDropdown.test.tsx— add the count-accuracy cases.3. Test and commit
npm test -- run PRFilterDropdownExample commit message
✅ Acceptance criteria
🔒 Security notes
None beyond standard correctness/regression risk.
📋 Guidelines