shankar0123
|
73c6bd1416
|
feat: add frontend action buttons, fix notification auth bug, add 53 Vitest tests
Bug fix:
- markNotificationRead was using raw fetch() without auth headers,
bypassing the shared client's Authorization header. Moved to
api/client.ts to use fetchJSON with proper auth.
New action buttons:
- CertificatesPage: "New Certificate" modal with form fields
- CertificateDetailPage: "Deploy" button with target selector modal,
"Archive" button with confirmation
- IssuersPage: "Test Connection" and "Delete" per-row actions
- TargetsPage: "Delete" per-row action
- PoliciesPage: "Enable/Disable" toggle and "Delete" per-row actions
New API client functions:
- updateCertificate, archiveCertificate, registerAgent,
createPolicy, updatePolicy, deletePolicy, getPolicyViolations,
createIssuer, testIssuerConnection, deleteIssuer,
createTarget, deleteTarget, markNotificationRead
Frontend tests (53 tests, 2 files):
- client.test.ts: 35 tests covering all API endpoints, auth headers,
401 handling, error parsing, HTTP methods, request bodies
- utils.test.ts: 18 tests covering formatDate, formatDateTime,
timeAgo, daysUntil, expiryColor
CI: Added "Run Frontend Tests" step to frontend-build job
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-16 00:05:21 -04:00 |
|