From 0e18ab33a9da4eb827305b9055a9f11f0669c811 Mon Sep 17 00:00:00 2001 From: Will Yuponce Date: Thu, 11 Jun 2026 13:22:21 -0400 Subject: [PATCH] fix(ci): repair type-check and backend/frontend test failures on main Three independent breakages were turning the Test Coverage workflow red on main (and on every PR branched from it): - TypeScript Type Check: drop unused `allPassed` local in maturity-panel, the unused Table* import in maturity-levels-settings, and the unused ReadinessChecklist import in data-product-details (TS6133/TS6192). - Backend Tests: pin the new TriggerType.ON_MATURITY_CHANGE wire value in test_trigger_enum_pin's expected table. - Frontend Tests: update system-rdf-namespace-labels test to expect the humanized fallback for unknown namespaces, matching the intentional change in dfde85d2 (humanize RDF source labels across UI). Co-authored-by: Isaac --- src/backend/src/tests/unit/test_trigger_enum_pin.py | 1 + .../src/components/data-products/maturity-panel.tsx | 1 - .../src/components/settings/maturity-levels-settings.tsx | 3 --- src/frontend/src/lib/system-rdf-namespace-labels.test.ts | 7 +++++-- src/frontend/src/views/data-product-details.tsx | 1 - 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/backend/src/tests/unit/test_trigger_enum_pin.py b/src/backend/src/tests/unit/test_trigger_enum_pin.py index 2f6d8589..d651a988 100644 --- a/src/backend/src/tests/unit/test_trigger_enum_pin.py +++ b/src/backend/src/tests/unit/test_trigger_enum_pin.py @@ -50,6 +50,7 @@ ("FOR_REQUEST_CERTIFY", "for_request_certify"), ("FOR_REQUEST_STATUS_CHANGE", "for_request_status_change"), ("ON_FIRST_ACCESS", "on_first_access"), + ("ON_MATURITY_CHANGE", "on_maturity_change"), ] diff --git a/src/frontend/src/components/data-products/maturity-panel.tsx b/src/frontend/src/components/data-products/maturity-panel.tsx index fa19e66b..b444b389 100644 --- a/src/frontend/src/components/data-products/maturity-panel.tsx +++ b/src/frontend/src/components/data-products/maturity-panel.tsx @@ -114,7 +114,6 @@ export function MaturityPanel({ entityType, entityId }: MaturityPanelProps) { {/* Level progression */} {report.levels.map((level: LevelResult) => { const isExpanded = expandedLevel === level.level_order; - const allPassed = level.achieved; const hasWarnings = level.gates.some(g => !g.passed && !g.required); const hasFails = level.gates.some(g => !g.passed && g.required); diff --git a/src/frontend/src/components/settings/maturity-levels-settings.tsx b/src/frontend/src/components/settings/maturity-levels-settings.tsx index 498e05c6..de960160 100644 --- a/src/frontend/src/components/settings/maturity-levels-settings.tsx +++ b/src/frontend/src/components/settings/maturity-levels-settings.tsx @@ -12,9 +12,6 @@ import { Switch } from '@/components/ui/switch'; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '@/components/ui/dialog'; -import { - Table, TableBody, TableCell, TableHead, TableHeader, TableRow, -} from '@/components/ui/table'; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, diff --git a/src/frontend/src/lib/system-rdf-namespace-labels.test.ts b/src/frontend/src/lib/system-rdf-namespace-labels.test.ts index 2cfb810b..7b1abdd6 100644 --- a/src/frontend/src/lib/system-rdf-namespace-labels.test.ts +++ b/src/frontend/src/lib/system-rdf-namespace-labels.test.ts @@ -1,5 +1,6 @@ import { describe, it, expect, vi } from 'vitest'; import { systemRdfNamespaceDisplayLabel } from './system-rdf-namespace-labels'; +import { humanizeRdfFilename } from './rdf-filename'; describe('systemRdfNamespaceDisplayLabel', () => { // Minimal stand-in for i18next's `t`: echoes the supplied defaultValue. @@ -22,7 +23,9 @@ describe('systemRdfNamespaceDisplayLabel', () => { ); }); - it('returns the original key for an unknown namespace', () => { - expect(systemRdfNamespaceDisplayLabel('urn:something-else', t)).toBe('urn:something-else'); + it('humanizes an unknown namespace key as a fallback', () => { + expect(systemRdfNamespaceDisplayLabel('urn:something-else', t)).toBe( + humanizeRdfFilename('urn:something-else'), + ); }); }); diff --git a/src/frontend/src/views/data-product-details.tsx b/src/frontend/src/views/data-product-details.tsx index 70fd4986..72db9dfd 100644 --- a/src/frontend/src/views/data-product-details.tsx +++ b/src/frontend/src/views/data-product-details.tsx @@ -53,7 +53,6 @@ import { Link2, Unlink, GitBranch } from 'lucide-react'; import { AssetSelector } from '@/components/common/asset-selector'; import { EntityTreePanel } from '@/components/common/entity-tree-panel'; import { BusinessLineageView } from '@/components/lineage'; -import { ReadinessChecklist } from '@/components/data-products/readiness-checklist'; import { MaturityInline } from '@/components/common/maturity-inline'; import { LineageEditor } from '@/components/common/lineage-editor'; import { useCopilotContext } from '@/hooks/use-copilot-context';