Skip to content

feat: Add purchase request list view with search, filters, and E2E tests#4

Merged
emertechie merged 31 commits intomainfrom
view-and-filter-reqs
Feb 12, 2026
Merged

feat: Add purchase request list view with search, filters, and E2E tests#4
emertechie merged 31 commits intomainfrom
view-and-filter-reqs

Conversation

@emertechie
Copy link
Owner

Summary

  • Add DepartmentId filter to QueryPurchaseRequests handler and API endpoint with test coverage
  • Implement /requests Blazor page with RadzenDataGrid, search, status/department filters, and server-side paging
  • Add 3 E2E tests for grid view, search filtering, and clear filters functionality
  • Fix DataSeeder to use config-based user lookup and filter to "test-" prefixed users in test environments

Replace hardcoded email lookups with dynamic search from configuration.
Enables flexible seeding without code changes.
- Add DepartmentId filter logic in QueryPurchaseRequests handler
- Add departmentId query param to API endpoint
- Add Can_filter_purchase_requests_by_department test
- Add RadzenDataGrid with server-side paging
- Add search bar for title/request number
- Add status dropdown filter
- Add department dropdown filter
- Add Apply/Clear filter buttons
- Add GetTestSeedUsers() to filter SeedUsers to test- prefixed emails
  Fixes config merge issue where app SeedUsers merged with test config
- Add 3 E2E tests: basic grid view, search by title, clear filters
- Mark Phase 3 complete in steps file
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new purchase request listing experience across backend, API, Blazor UI, and E2E coverage, including a new Department filter and improvements to test seeding behavior.

Changes:

  • Add departmentId filtering to QueryPurchaseRequests and wire it through the API endpoint with integration test coverage.
  • Implement the Blazor /requests page with RadzenDataGrid, search + status/department filters, and server-side paging.
  • Add Playwright E2E coverage for list rendering and filter behaviors; adjust DataSeeder to better support test-user configs.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
compose.yaml Switches local DB container config (and removes separate test DB service).
ProcureHub/Features/PurchaseRequests/QueryPurchaseRequests.cs Adds DepartmentId to query request + EF filter.
ProcureHub/Data/DataSeeder.cs Filters seed users by test- prefix (config-driven) and looks up seeding users via config instead of hardcoding emails.
ProcureHub.WebApi/Features/PurchaseRequests/Endpoints.cs Adds departmentId query param and passes into domain query.
ProcureHub.WebApi.Tests/Features/PurchaseRequestTests.cs Adds integration test for department filtering.
ProcureHub.BlazorApp/Components/Pages/Requests/Index.razor Implements /requests list page with Radzen grid + filters.
ProcureHub.BlazorApp.E2ETests/Infrastructure/BlazorPageTest.cs Minor whitespace cleanup.
ProcureHub.BlazorApp.E2ETests/Features/PurchaseRequestListTests.cs Adds E2E tests for list visibility, search filtering, and clearing filters.
ProcureHub.BlazorApp.E2ETests/AGENTS.md Reinforces guidance to avoid time-based waits in Playwright tests.
.plans/use-cases/01_view_and_search_purchase_requests*.md Adds planning/use-case documentation for the feature.
.github/workflows/api-build-and-test.yml Switches CI service DB config and updates test connection string.
.agents/skills/usecase/SKILL.md Refactors “usecase” skill to delegate to “steps”.
.agents/skills/steps/SKILL.md Adds new “steps” skill guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

emertechie and others added 16 commits February 11, 2026 14:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Just cannot get health-cmd to work with secret or env variable
Cannot get secrets or env to work with SQL server health check in timebox
Used WaitUntilState.NetworkIdle, which is strongly discouraged
- Create reusable DebouncedSearchInput component with 350ms debounce
- Remove Apply button from Requests page; search now triggers on:
  - Debounced input (350ms after typing stops)
  - Enter key press (immediate)
  - Dropdown selection changes (immediate)
- Apply same debounced search behavior to Users page
@emertechie emertechie merged commit 7c86ad9 into main Feb 12, 2026
1 check failed
@emertechie emertechie deleted the view-and-filter-reqs branch February 12, 2026 14:43
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.

2 participants