Replace type synonym Projects.ProjectId with UUIDId constructor
in all test files to fix "Illegal term-level use of type constructor"
errors that occur with GHC 9.12's TypeAbstractions extension.
Update all integration tests to properly unpack tuple response from testServant helper, which now returns (RespHeaders a, a).
Key changes:
- Add servant and servant-htmx to integration test dependencies
- Fix tuple unpacking in all test specs (AnomalyList, Log, Alerts, ManageMembers, Projects, BusinessFlows, Reports, Api, ApiCatalog, GrpcIngestion)
- Fix BusinessFlowsSpec imports to use ResponseHeader data constructor
- Fix type-level string usage for header lookups
- Fix ProjectId to Text conversions using .toText
- Add missing pattern match cases to avoid incomplete pattern warnings
Simplified test code by:
- Replacing verbose toServantResponse pattern with concise testServant helper
- Changed test lambdas from \tr@TestResources{..} to \tr for cleaner syntax
- Updated field access to use dot notation (tr.trPool, tr.trATCtx, etc.)
This reduces boilerplate and improves test readability across all integration
test suites while maintaining the same functionality.
Affected test suites:
- Pages (ApiSpec, LogExplorer, Anomalies, Projects, Endpoints, Reports,
Monitors, BusinessFlows, Share)
- MonitoringSpec
- ProcessMessageSpec