test(portal): add phase22 behavioural closure and route harmonization

This commit is contained in:
2026-03-25 12:04:11 +00:00
parent 6b66ad6d8f
commit 10f221af38
4 changed files with 204 additions and 3 deletions
+42
View File
@@ -2639,3 +2639,45 @@ Validation:
Follow-ups:
- Optional closure slice: add a dedicated phase22 portal-service behavioural suite and finish harmonization of remaining direct query string composition in `portalDirectService` write helpers.
---
### CL-074: TASK22260 optional closure condensed slice — portal phase22 behavioural coverage + final write-helper query harmonization
date: 2026-03-25
author: Cline
scope: `actions/services/portalDirectService.js`, `tests/phase22/{portal-service-behaviour,index}.test.cjs`
type: change
rationale: Complete optional closure work as one condensed slice by adding explicit portal behavioral coverage and removing remaining direct literal query strings in portal write helpers.
impact: Improves regression confidence for signed portal flows and closes remaining route-composition harmonization gap in portal service write helpers without changing runtime behavior contracts.
status: completed
Summary:
- Harmonized remaining portal write-helper route literals to `buildFileQuery(...)`:
- `createWatchedCases`
- `setRepInvolvment`
- `setCaseInvolvment`
- Added new phase22 suite `tests/phase22/portal-service-behaviour.test.cjs` covering:
- signed hash suffix append path in `sendCaseCompleteMessage`
- signed delete request contract + headers in `deleteMyRepresentations`
- harmonized route helper URL in `createWatchedCases`
- signed pre-request rejection contract in `sendRepCompleteMessage` when hash-signing fails
- Updated `tests/phase22/index.test.cjs` aggregate runner to include `portal-service-behaviour`.
Validation:
- `node tests/phase22/portal-service-behaviour.test.cjs` -> pass (4/4)
- `node tests/phase22/index.test.cjs` -> pass
- core-token: 2/2
- client-utils: 6/6
- file-client: 4/4
- case-service: 4/4
- portal-service: 4/4
- phase22 combined: pass
- `node tests/phase7/service-behaviour.test.cjs` -> pass (13/13)
- `npm run lint` -> warnings only (pre-existing `react-hooks/exhaustive-deps`; no new lint errors)
Follow-ups:
- Closure for this condensed stream complete; any further work should be a separate expansion stream (e.g., additional service-level phase22 coverage breadth).