-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
We have near-identical permission matrix tests per collection (e.g., clinicGalleryMedia.permission.test.ts, clinicGalleryEntries.permission.test.ts). Let's introduce a tiny test generator to cut boilerplate while preserving matrix coverage.
Proposal:
- Add
tests/unit/access-matrix/generatePermissionSuite.tsexportingmakePermissionSuite(slug, collection, displayName?) - Refactor per-collection tests to 2–3 lines that call
makePermissionSuite - Keep
matrix-helpersusage and per-collection display names intact - Ensure CI
matrix:verifyremains unaffected
Acceptance:
- Existing permission matrix tests pass unchanged
- No reduction in coverage; only code duplication reduced
Notes:
- This is a test-only refactor (no runtime changes)
- Can be rolled out incrementally: add generator, refactor a couple of suites first
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels