Skip to content

feat: date-range and milestone filters for validation history (#282)#508

Open
Favourejiro wants to merge 1 commit into
Disciplr-Org:mainfrom
Favourejiro:feature/validation-history-date-milestone-filter
Open

feat: date-range and milestone filters for validation history (#282)#508
Favourejiro wants to merge 1 commit into
Disciplr-Org:mainfrom
Favourejiro:feature/validation-history-date-milestone-filter

Conversation

@Favourejiro

@Favourejiro Favourejiro commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Closes #282

date-range and milestone filtering for the verifier ValidationHistory page.

The filter logic, UI controls, tests, and docs for this feature were in place, but the ValidationHistory test suite could not run: the page renders StatusChipTooltip, which calls window.matchMedia. jsdom does not implement matchMedia and the shared test setup never mocked it, so every test threw before asserting.

This PR adds a window.matchMedia stub to src/setupTests.ts so the suite runs.

Behavior (per issue requirements)

  • filterValidationHistory accepts optional { from, to, milestone }.
  • Date-range inputs and milestone filter in ValidationHistory.tsx.
  • Pagination resets to page 1 on any filter change.
  • Status/search filters unchanged.

Testing

  • paginate.test.ts — 21/21 pass (open-ended ranges, inclusive bounds, no-match, combined filters).
  • ValidationHistory.test.tsx — 17/17 pass (date range, milestone, page-1 reset, combined with status/search).
  • No regressions: the matchMedia stub strictly reduces pre-existing failures across other Tooltip/Theme-dependent suites.

ValidationHistory renders StatusChip -> Tooltip, which calls
window.matchMedia. jsdom does not implement it, so the date-range and
milestone filter tests (issue Disciplr-Org#282) threw before asserting. Provide a
matchMedia stub in the shared test setup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add date-range and milestone filtering to the ValidationHistory verifier page

1 participant