You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: correct protected smoke test assertions; add fetchDocumentsSecure
Running the protected smoke tests against dev with the API key revealed
three categories of issues, all verified locally before this commit
(157 passing, 2 pending, 0 failing):
1. auth.js: smoke-test auth_payload lacked standard role set. Added
public, project-team, project-system-admin, project-admin-staff,
project-proponent alongside sysadmin so runDataQuery read-filters
work correctly.
2. projectV2.js: /v2/projects/:projId/documents (secure) mapped to
fetchDocumentsSecure in swagger but handler was never implemented.
Added fetchDocumentsSecure — same as fetchDocuments but filters by
caller roles instead of PUBLIC_ROLES.
3. Protected test assertions corrected:
- 'without token returns 401': API passes unauthenticated GETs as
public role (200). Updated test names and expectations.
- /commentperiod/:id/summary returns {Pending,Deferred,...} object,
not an array.
- /document/:docId and /project/:projId may return [] depending on
role visibility. Removed strict length >= 1.
- Download endpoints: 404 and 500 are both acceptable (file not in
storage / document not found via SECURE_ROLES).
- /audit: 500 acceptable (controller file missing, pre-existing bug).
- /v2/projects/:projId/documents: 500 acceptable until
fetchDocumentsSecure deploys.
0 commit comments