feat(web): promote IwoooS unlock path
This commit is contained in:
@@ -45,6 +45,17 @@ def assert_text_not_contains(label: str, text: str, forbidden: str) -> None:
|
||||
raise SystemExit(f"BLOCKED {label}: forbidden {forbidden!r}")
|
||||
|
||||
|
||||
def assert_text_before(label: str, text: str, first: str, second: str) -> None:
|
||||
first_index = text.find(first)
|
||||
second_index = text.find(second)
|
||||
if first_index == -1:
|
||||
raise SystemExit(f"BLOCKED {label}: missing first marker {first!r}")
|
||||
if second_index == -1:
|
||||
raise SystemExit(f"BLOCKED {label}: missing second marker {second!r}")
|
||||
if first_index >= second_index:
|
||||
raise SystemExit(f"BLOCKED {label}: expected {first!r} before {second!r}")
|
||||
|
||||
|
||||
def collect_string_values(value: Any) -> list[str]:
|
||||
if isinstance(value, str):
|
||||
return [value]
|
||||
@@ -587,6 +598,7 @@ def validate(root: Path) -> None:
|
||||
"s2_139_iwooos_product_evidence_wiring_preflight_retry_review_candidate_preflight_recovery_ledger",
|
||||
"s2_140_iwooos_product_evidence_wiring_preflight_retry_review_candidate_preflight_recovery_retry_gates",
|
||||
"s2_141_iwooos_all_product_coverage_snapshot",
|
||||
"s2_142_iwooos_first_unlock_path_first_layer",
|
||||
]
|
||||
assert_equal(
|
||||
"progress_delta_ledger.delta_ids",
|
||||
@@ -1411,6 +1423,42 @@ def validate(root: Path) -> None:
|
||||
iwooos_projection["summary"]["all_product_coverage_snapshot_default_summary_mode"],
|
||||
"compact_first",
|
||||
)
|
||||
assert_true(
|
||||
"iwooos_projection.summary.first_progress_unlock_path_first_layer",
|
||||
iwooos_projection["summary"]["first_progress_unlock_path_first_layer"],
|
||||
)
|
||||
assert_true(
|
||||
"iwooos_projection.summary.first_progress_unlock_path_default_visible",
|
||||
iwooos_projection["summary"]["first_progress_unlock_path_default_visible"],
|
||||
)
|
||||
assert_true(
|
||||
"iwooos_projection.summary.first_progress_unlock_path_above_visual_dashboard",
|
||||
iwooos_projection["summary"]["first_progress_unlock_path_above_visual_dashboard"],
|
||||
)
|
||||
assert_equal(
|
||||
"iwooos_projection.summary.first_progress_unlock_path_step_count",
|
||||
iwooos_projection["summary"]["first_progress_unlock_path_step_count"],
|
||||
5,
|
||||
)
|
||||
assert_true(
|
||||
"iwooos_projection.summary.first_progress_unlock_path_boundary_details_collapsed",
|
||||
iwooos_projection["summary"]["first_progress_unlock_path_boundary_details_collapsed"],
|
||||
)
|
||||
assert_equal(
|
||||
"iwooos_projection.summary.first_progress_unlock_path_owner_response_received_count",
|
||||
iwooos_projection["summary"]["first_progress_unlock_path_owner_response_received_count"],
|
||||
0,
|
||||
)
|
||||
assert_equal(
|
||||
"iwooos_projection.summary.first_progress_unlock_path_owner_response_accepted_count",
|
||||
iwooos_projection["summary"]["first_progress_unlock_path_owner_response_accepted_count"],
|
||||
0,
|
||||
)
|
||||
assert_equal(
|
||||
"iwooos_projection.summary.first_progress_unlock_path_runtime_gate_count",
|
||||
iwooos_projection["summary"]["first_progress_unlock_path_runtime_gate_count"],
|
||||
0,
|
||||
)
|
||||
assert_true(
|
||||
"iwooos_projection.summary.all_product_coverage_snapshot_detail_ledger_collapsed",
|
||||
iwooos_projection["summary"]["all_product_coverage_snapshot_detail_ledger_collapsed"],
|
||||
@@ -11602,6 +11650,88 @@ def validate(root: Path) -> None:
|
||||
iwooos_projection_page,
|
||||
"IwoooSFirstProgressUnlockPathBoard",
|
||||
)
|
||||
assert_equal(
|
||||
"iwooos_page.first_progress_unlock_path_render_count",
|
||||
iwooos_projection_page.count("<IwoooSFirstProgressUnlockPathBoard />"),
|
||||
1,
|
||||
)
|
||||
assert_text_before(
|
||||
"iwooos_page.first_progress_unlock_path_before_visual_dashboard",
|
||||
iwooos_projection_page,
|
||||
"<IwoooSFirstProgressUnlockPathBoard />",
|
||||
"<IwoooSVisualCommandDashboard />",
|
||||
)
|
||||
assert_text_before(
|
||||
"iwooos_page.first_progress_unlock_path_first_layer_order",
|
||||
iwooos_projection_page,
|
||||
"<IwoooSFirstProgressUnlockPathBoard />",
|
||||
"<IwoooSProfessionalSecurityExperience />",
|
||||
)
|
||||
assert_text_before(
|
||||
"iwooos_page.first_progress_unlock_path_before_deep_sections",
|
||||
iwooos_projection_page,
|
||||
"<IwoooSFirstProgressUnlockPathBoard />",
|
||||
"<IwoooSSectionGroup",
|
||||
)
|
||||
assert_text_contains(
|
||||
"iwooos_page.first_progress_unlock_path_boundary_details",
|
||||
iwooos_projection_page,
|
||||
'data-testid="iwooos-first-progress-unlock-path-boundaries"',
|
||||
)
|
||||
expected_first_progress_unlock_path_step_ids = [
|
||||
"owner_response_scope",
|
||||
"redacted_evidence_pointer",
|
||||
"intake_preflight",
|
||||
"review_acceptance",
|
||||
"headline_review_candidate",
|
||||
]
|
||||
first_progress_unlock_path_steps = iwooos_projection["first_progress_unlock_path_steps"]
|
||||
assert_equal(
|
||||
"iwooos_projection.first_progress_unlock_path_steps.ids",
|
||||
[item["step_id"] for item in first_progress_unlock_path_steps],
|
||||
expected_first_progress_unlock_path_step_ids,
|
||||
)
|
||||
assert_equal(
|
||||
"iwooos_projection.first_progress_unlock_path_steps.display_order",
|
||||
[item["display_order"] for item in first_progress_unlock_path_steps],
|
||||
list(range(1, len(expected_first_progress_unlock_path_step_ids) + 1)),
|
||||
)
|
||||
for item in first_progress_unlock_path_steps:
|
||||
assert_equal(
|
||||
f"iwooos_projection.first_progress_unlock_path_steps.{item['step_id']}.source_focus",
|
||||
item["source_focus"],
|
||||
"s4_9_owner_response",
|
||||
)
|
||||
assert_equal(
|
||||
f"iwooos_projection.first_progress_unlock_path_steps.{item['step_id']}.display_mode",
|
||||
item["display_mode"],
|
||||
"first_layer_progress_unlock_path",
|
||||
)
|
||||
for count_key in [
|
||||
"owner_response_received_count",
|
||||
"owner_response_accepted_count",
|
||||
"redacted_evidence_pointer_count",
|
||||
"preflight_passed_count",
|
||||
]:
|
||||
assert_equal(
|
||||
f"iwooos_projection.first_progress_unlock_path_steps.{item['step_id']}.{count_key}",
|
||||
item[count_key],
|
||||
0,
|
||||
)
|
||||
for flag in [
|
||||
"headline_review_authorized",
|
||||
"runtime_gate_opened",
|
||||
"runtime_execution_authorized",
|
||||
"action_buttons_allowed",
|
||||
]:
|
||||
assert_false(
|
||||
f"iwooos_projection.first_progress_unlock_path_steps.{item['step_id']}.{flag}",
|
||||
item[flag],
|
||||
)
|
||||
assert_true(
|
||||
f"iwooos_projection.first_progress_unlock_path_steps.{item['step_id']}.not_authorization",
|
||||
item["not_authorization"],
|
||||
)
|
||||
for text in [
|
||||
"iwooos_first_unlock_path_step_count=5",
|
||||
"iwooos_first_unlock_path_current_focus=s4_9_owner_response",
|
||||
@@ -11637,7 +11767,7 @@ def validate(root: Path) -> None:
|
||||
list(web_messages_en["iwooos"].keys()),
|
||||
"firstProgressUnlockPath",
|
||||
)
|
||||
for key in ["title", "subtitle", "summary", "items", "stepLabel", "boundaryTitle", "boundaryIntro"]:
|
||||
for key in ["eyebrow", "title", "subtitle", "summary", "items", "stepLabel", "boundaryTitle", "boundaryIntro"]:
|
||||
assert_contains(
|
||||
"web_messages.zh-TW.iwooos.firstProgressUnlockPath.keys",
|
||||
list(web_messages_zh["iwooos"]["firstProgressUnlockPath"].keys()),
|
||||
|
||||
Reference in New Issue
Block a user