mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-07 15:01:32 +00:00
52a9e4977c
CI surfaced two real failures in the Pass 3 tests: 1. ObservabilityPage.test.tsx — tests 2 + 3 mocked getMetrics with only the uptime field, but ObservabilityPage.tsx:85 reads metrics.gauge .certificate_total. Test 2 silently 'passed' because the page error bailed out before any rendering took place — its assertions (no live <script>, __xss_pwned__ undefined) became vacuous; test 3 surfaced the actual TypeError. Fix: every getMetrics mock now returns the full MetricsResponse shape (gauge / counter / uptime) per src/api/types.ts :517 — sanity-checked against the actual TS interface. 2. CertificateDetailPage.test.tsx — the xssCert mock was missing updated_at, which CertificateDetailPage.tsx:605 reads through formatDateTime. formatDateTime tolerates undefined per utils.ts:6, so the page didn't throw, but the cert mock should mirror the real ManagedCertificate shape — added updated_at. Both fixes are mock-shape corrections; no production code changes.