feat(datasources): govern approvals and retention
Module Package Release / publish-packages (push) Successful in 11s
Module Package Release / publish-packages (push) Successful in 11s
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
PAGE = ROOT / "webui" / "src" / "features" / "datasources" / "DatasourcesPage.tsx"
|
||||
API = ROOT / "webui" / "src" / "api" / "datasources.ts"
|
||||
|
||||
|
||||
class DatasourceLifecycleGovernanceUiTests(unittest.TestCase):
|
||||
def test_stage_decisions_and_retention_use_shared_semantic_primitives(self) -> None:
|
||||
source = PAGE.read_text(encoding="utf-8")
|
||||
|
||||
self.assertIn("<WorkspaceActionBar", source)
|
||||
self.assertIn("function StageDecisionDialog", source)
|
||||
self.assertIn("function RetentionDialog", source)
|
||||
self.assertIn("<ConfirmDialog", source)
|
||||
self.assertIn('variant="danger"', source)
|
||||
self.assertIn("datasources.field.approval-policy", source)
|
||||
self.assertIn("datasources.field.retention-policy-contract", source)
|
||||
self.assertIn('state === "awaiting_approval"', source)
|
||||
|
||||
def test_client_binds_decisions_and_apply_to_server_evidence(self) -> None:
|
||||
source = API.read_text(encoding="utf-8")
|
||||
|
||||
self.assertIn("expected_policy_hash", source)
|
||||
self.assertIn("expected_subject_digest", source)
|
||||
self.assertIn("/lifecycle-evidence", source)
|
||||
self.assertIn("/retention/plan", source)
|
||||
self.assertIn("plan_hash: plan.plan_hash", source)
|
||||
self.assertIn("/refresh/stage", source)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user