Skip to content

[Test] bUnit: IssuesPage filter and search wiring #125

@mpaulosky

Description

@mpaulosky

Summary

After the IssuesPage filter bug (#116) is fixed, this issue adds bUnit tests to lock in the correct behavior and prevent regression.

Test File to Create

tests/Web.Tests.Bunit/Components/Issues/IssuesPageFilterTests.cs

Tests

  • LoadIssues_OnInit_CallsApiWithDefaultParams — verifies GetAllAsync(page:1, pageSize:20, searchTerm:null, statusName:null, categoryName:null) called on mount
  • SearchBox_WhenFilled_PassesSearchTermToApi
  • StatusFilter_WhenSelected_PassesStatusNameToApi
  • CategoryFilter_WhenSelected_PassesCategoryNameToApi
  • MultipleFilters_AllPassedToApiCombined
  • ClearButton_ResetsAllFiltersAndCallsApiWithDefaults
  • FilterChange_ResetsPageToOne — changing a filter resets to first page

Mocking

  • Mock IssueApiClient via NSubstitute
  • Capture the arguments passed to GetAllAsync and assert on them
  • Render with pre-seeded category + status dropdown data

Acceptance Criteria

  • All filter-wiring tests pass
  • Regression: if a future change accidentally removes the param passing, at least one test will fail
  • Pagination reset on filter change is verified

Depends On

Metadata

Metadata

Labels

go:yesReady to implementpriority:p2Next sprintrelease:backlogNot yet targetedsprint-3Sprint 3 — Full CRUD UI + ArchivesquadSquad triage inbox — Lead will assign to a membersquad:copilotAssigned to @copilot (Coding Agent) for autonomous worksquad:gimliAssigned to Gimli (Tester)type:choreMaintenance, refactoring, cleanup

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions