fix: align opportunity UI with canonical current action

This commit is contained in:
plx
2026-08-15 09:47:19 +00:00
parent ee8e2de606
commit 47f21888f9
5 changed files with 366 additions and 12 deletions

View File

@@ -92,11 +92,11 @@ def test_validated_reconstructed_review_does_not_reopen_from_title():
assert reconstructed_review_status(metadata) == "validated"
def test_board_prefers_pending_task_and_explicit_review():
def test_board_prefers_structured_decision_and_explicit_review():
source = (ROOT / "app" / "admin_ui" / "pages" / "opportunities.py").read_text(encoding="utf-8")
function = source[source.index("def _opportunity_card_next_action"):source.index("def _is_noise_opportunity")]
assert function.index("reconstructed_review_required(metadata)") < function.index("central = _central_next_action_for_card")
assert function.index("pending_primary_action_code") < function.index("central = _central_next_action_for_card")
assert function.index("central = _central_next_action_for_card") < function.index("pending_primary_action_code")
assert 'return "Validar processo reconstruído"' in function