feat(web): show owner response validation approvals
This commit is contained in:
@@ -308,6 +308,7 @@ def validate(root: Path) -> None:
|
||||
"s2_72_awooop_home_owner_response_validation_rollup",
|
||||
"s2_73_awooop_work_items_owner_response_validation_candidate",
|
||||
"s2_74_awooop_contracts_owner_response_validation_candidate",
|
||||
"s2_75_awooop_approvals_owner_response_validation_boundary",
|
||||
]
|
||||
assert_equal(
|
||||
"progress_delta_ledger.delta_ids",
|
||||
@@ -422,6 +423,11 @@ def validate(root: Path) -> None:
|
||||
[item["action_id"] for item in rollup["next_safe_actions"] if isinstance(item, dict)],
|
||||
"show_awooop_approvals_github_primary_readiness_boundary",
|
||||
)
|
||||
assert_contains(
|
||||
"rollup.next_safe_actions.action_ids",
|
||||
[item["action_id"] for item in rollup["next_safe_actions"] if isinstance(item, dict)],
|
||||
"show_awooop_approvals_owner_response_validation_boundary",
|
||||
)
|
||||
assert_contains(
|
||||
"rollup.next_safe_actions.action_ids",
|
||||
[item["action_id"] for item in rollup["next_safe_actions"] if isinstance(item, dict)],
|
||||
@@ -566,6 +572,31 @@ def validate(root: Path) -> None:
|
||||
forbidden,
|
||||
)
|
||||
|
||||
zh_awooop_approvals_owner_validation_text = "\n".join(
|
||||
collect_string_values(web_messages_zh["awooop"]["approvals"]["ownerResponseValidationBoundary"])
|
||||
)
|
||||
for forbidden in [
|
||||
"secret value",
|
||||
"workflow / secret",
|
||||
"runtime gate",
|
||||
"runtime enforcement",
|
||||
"approval record",
|
||||
"repo action",
|
||||
"repo 建立",
|
||||
"repo / refs",
|
||||
"refs action",
|
||||
"refs 動作",
|
||||
"sync / delete / force push",
|
||||
"received / accepted",
|
||||
"received / accepted / rejected",
|
||||
"waiting owner response",
|
||||
]:
|
||||
assert_text_not_contains(
|
||||
"web_messages.zh-TW.awooop_approvals_owner_validation_wording",
|
||||
zh_awooop_approvals_owner_validation_text,
|
||||
forbidden,
|
||||
)
|
||||
|
||||
zh_awooop_home_security_text = json.dumps(
|
||||
{
|
||||
"securityMirror": web_messages_zh["awooop"]["home"]["securityMirror"],
|
||||
@@ -5805,6 +5836,57 @@ def validate(root: Path) -> None:
|
||||
key,
|
||||
)
|
||||
|
||||
assert_text_contains(
|
||||
"awooop_approvals_page.owner_response_validation_boundary_panel",
|
||||
awooop_approvals_page,
|
||||
"OwnerResponseValidationApprovalBoundaryPanel",
|
||||
)
|
||||
assert_text_contains("awooop_approvals_page.owner_response_validation_iwooos_link", awooop_approvals_page, 'href="/iwooos"')
|
||||
for text in [
|
||||
"owner_response_validation_received_count=0",
|
||||
"owner_response_validation_accepted_count=0",
|
||||
"owner_response_validation_rejected_count=0",
|
||||
"approval_record_created=false",
|
||||
"repo_creation_authorized=false",
|
||||
"refs_sync_authorized=false",
|
||||
"workflow_modification_authorized=false",
|
||||
"secret_value_collection_allowed=false",
|
||||
"github_primary_switch_authorized=false",
|
||||
"runtime_execution_authorized=false",
|
||||
"action_buttons_allowed=false",
|
||||
]:
|
||||
assert_text_contains("awooop_approvals_page.owner_response_validation_boundary", awooop_approvals_page, text)
|
||||
for text in [
|
||||
"source_control_owner_response_validation_rollup_v1",
|
||||
"gitea_inventory_owner_attestation_response_v1",
|
||||
"github_target_owner_decision_response_v1",
|
||||
"source_control_ref_truth_owner_response_v1",
|
||||
"source_control_workflow_secret_name_owner_response_v1",
|
||||
]:
|
||||
assert_text_contains("awooop_approvals_page.owner_response_validation_refs", awooop_approvals_page, text)
|
||||
for key in [
|
||||
"title",
|
||||
"subtitle",
|
||||
"badge",
|
||||
"reviewRefsTitle",
|
||||
"boundaryLabel",
|
||||
"boundaryTitle",
|
||||
"boundaryDetail",
|
||||
"openIwooos",
|
||||
"metrics",
|
||||
"reviewRefs",
|
||||
]:
|
||||
assert_contains(
|
||||
"web_messages.zh-TW.awooop.approvals.ownerResponseValidationBoundary",
|
||||
list(web_messages_zh["awooop"]["approvals"]["ownerResponseValidationBoundary"].keys()),
|
||||
key,
|
||||
)
|
||||
assert_contains(
|
||||
"web_messages.en.awooop.approvals.ownerResponseValidationBoundary",
|
||||
list(web_messages_en["awooop"]["approvals"]["ownerResponseValidationBoundary"].keys()),
|
||||
key,
|
||||
)
|
||||
|
||||
assert_text_contains("awooop_contracts_page.security_contract_candidate_panel", awooop_contracts_page, "SecurityContractCandidatePanel")
|
||||
assert_text_contains("awooop_contracts_page.iwooos_link", awooop_contracts_page, 'href="/iwooos"')
|
||||
assert_text_contains("awooop_contracts_page.project_header_traditional_chinese", awooop_contracts_page, "專案 ID")
|
||||
|
||||
Reference in New Issue
Block a user