feat(web): add IwoooS command map
This commit is contained in:
@@ -599,6 +599,7 @@ def validate(root: Path) -> None:
|
||||
"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",
|
||||
"s2_143_iwooos_command_map_first_layer",
|
||||
]
|
||||
assert_equal(
|
||||
"progress_delta_ledger.delta_ids",
|
||||
@@ -1459,6 +1460,37 @@ def validate(root: Path) -> None:
|
||||
iwooos_projection["summary"]["first_progress_unlock_path_runtime_gate_count"],
|
||||
0,
|
||||
)
|
||||
assert_true(
|
||||
"iwooos_projection.summary.command_map_first_layer",
|
||||
iwooos_projection["summary"]["command_map_first_layer"],
|
||||
)
|
||||
assert_equal(
|
||||
"iwooos_projection.summary.command_map_mode_count",
|
||||
iwooos_projection["summary"]["command_map_mode_count"],
|
||||
6,
|
||||
)
|
||||
assert_equal(
|
||||
"iwooos_projection.summary.command_map_default_mode",
|
||||
iwooos_projection["summary"]["command_map_default_mode"],
|
||||
"unlock",
|
||||
)
|
||||
assert_true(
|
||||
"iwooos_projection.summary.command_map_above_first_progress_unlock_path",
|
||||
iwooos_projection["summary"]["command_map_above_first_progress_unlock_path"],
|
||||
)
|
||||
assert_true(
|
||||
"iwooos_projection.summary.command_map_navigation_controls_allowed",
|
||||
iwooos_projection["summary"]["command_map_navigation_controls_allowed"],
|
||||
)
|
||||
assert_false(
|
||||
"iwooos_projection.summary.command_map_execution_action_buttons_allowed",
|
||||
iwooos_projection["summary"]["command_map_execution_action_buttons_allowed"],
|
||||
)
|
||||
assert_equal(
|
||||
"iwooos_projection.summary.command_map_runtime_gate_count",
|
||||
iwooos_projection["summary"]["command_map_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"],
|
||||
@@ -11732,6 +11764,117 @@ def validate(root: Path) -> None:
|
||||
f"iwooos_projection.first_progress_unlock_path_steps.{item['step_id']}.not_authorization",
|
||||
item["not_authorization"],
|
||||
)
|
||||
assert_text_contains(
|
||||
"iwooos_page.command_map_testid",
|
||||
iwooos_projection_page,
|
||||
'data-testid="iwooos-command-map-board"',
|
||||
)
|
||||
assert_text_contains(
|
||||
"iwooos_page.command_map_component",
|
||||
iwooos_projection_page,
|
||||
"IwoooSCommandMapBoard",
|
||||
)
|
||||
assert_text_before(
|
||||
"iwooos_page.command_map_before_first_unlock_path",
|
||||
iwooos_projection_page,
|
||||
"<IwoooSCommandMapBoard />",
|
||||
"<IwoooSFirstProgressUnlockPathBoard />",
|
||||
)
|
||||
assert_text_before(
|
||||
"iwooos_page.command_map_before_visual_dashboard",
|
||||
iwooos_projection_page,
|
||||
"<IwoooSCommandMapBoard />",
|
||||
"<IwoooSVisualCommandDashboard />",
|
||||
)
|
||||
assert_text_contains(
|
||||
"iwooos_page.command_map_boundaries",
|
||||
iwooos_projection_page,
|
||||
'data-testid="iwooos-command-map-boundaries"',
|
||||
)
|
||||
for text in [
|
||||
"iwooos_command_map_first_layer=true",
|
||||
"iwooos_command_map_mode_count=6",
|
||||
"iwooos_command_map_default_mode=unlock",
|
||||
"iwooos_command_map_above_first_progress_unlock_path=true",
|
||||
"iwooos_command_map_navigation_controls_allowed=true",
|
||||
"iwooos_command_map_execution_action_buttons_allowed=false",
|
||||
"iwooos_command_map_runtime_gate_count=0",
|
||||
"iwooos_command_map_kali_execute_authorized=false",
|
||||
"iwooos_command_map_host_mutation_authorized=false",
|
||||
"iwooos_command_map_source_control_mutation_authorized=false",
|
||||
"iwooos_command_map_github_primary_switch_authorized=false",
|
||||
"runtime_execution_authorized=false",
|
||||
"active_runtime_gate_count=0",
|
||||
"not_authorization=true",
|
||||
]:
|
||||
assert_text_contains(
|
||||
"iwooos_page.command_map_boundary",
|
||||
iwooos_projection_page,
|
||||
text,
|
||||
)
|
||||
expected_command_map_item_ids = [
|
||||
"unlock",
|
||||
"scope",
|
||||
"hosts",
|
||||
"sourceControl",
|
||||
"awooop",
|
||||
"boundary",
|
||||
]
|
||||
command_map_items = iwooos_projection["command_map_items"]
|
||||
assert_equal(
|
||||
"iwooos_projection.command_map_items.ids",
|
||||
[item["item_id"] for item in command_map_items],
|
||||
expected_command_map_item_ids,
|
||||
)
|
||||
assert_equal(
|
||||
"iwooos_projection.command_map_items.display_order",
|
||||
[item["display_order"] for item in command_map_items],
|
||||
list(range(1, len(expected_command_map_item_ids) + 1)),
|
||||
)
|
||||
for item in command_map_items:
|
||||
assert_equal(
|
||||
f"iwooos_projection.command_map_items.{item['item_id']}.display_mode",
|
||||
item["display_mode"],
|
||||
"first_layer_command_map",
|
||||
)
|
||||
assert_true(
|
||||
f"iwooos_projection.command_map_items.{item['item_id']}.navigation_control_allowed",
|
||||
item["navigation_control_allowed"],
|
||||
)
|
||||
assert_false(
|
||||
f"iwooos_projection.command_map_items.{item['item_id']}.execution_action_button_allowed",
|
||||
item["execution_action_button_allowed"],
|
||||
)
|
||||
assert_false(
|
||||
f"iwooos_projection.command_map_items.{item['item_id']}.runtime_gate_opened",
|
||||
item["runtime_gate_opened"],
|
||||
)
|
||||
assert_false(
|
||||
f"iwooos_projection.command_map_items.{item['item_id']}.runtime_execution_authorized",
|
||||
item["runtime_execution_authorized"],
|
||||
)
|
||||
assert_true(
|
||||
f"iwooos_projection.command_map_items.{item['item_id']}.not_authorization",
|
||||
item["not_authorization"],
|
||||
)
|
||||
source_control_item = next(item for item in command_map_items if item["item_id"] == "sourceControl")
|
||||
assert_false(
|
||||
"iwooos_projection.command_map_items.sourceControl.source_control_mutation_authorized",
|
||||
source_control_item["source_control_mutation_authorized"],
|
||||
)
|
||||
assert_false(
|
||||
"iwooos_projection.command_map_items.sourceControl.github_primary_switch_authorized",
|
||||
source_control_item["github_primary_switch_authorized"],
|
||||
)
|
||||
boundary_item = next(item for item in command_map_items if item["item_id"] == "boundary")
|
||||
assert_false(
|
||||
"iwooos_projection.command_map_items.boundary.kali_execute_authorized",
|
||||
boundary_item["kali_execute_authorized"],
|
||||
)
|
||||
assert_false(
|
||||
"iwooos_projection.command_map_items.boundary.host_mutation_authorized",
|
||||
boundary_item["host_mutation_authorized"],
|
||||
)
|
||||
for text in [
|
||||
"iwooos_first_unlock_path_step_count=5",
|
||||
"iwooos_first_unlock_path_current_focus=s4_9_owner_response",
|
||||
@@ -11806,6 +11949,60 @@ def validate(root: Path) -> None:
|
||||
list(web_messages_en["iwooos"]["firstProgressUnlockPath"]["items"].keys()),
|
||||
key,
|
||||
)
|
||||
assert_contains(
|
||||
"web_messages.zh-TW.iwooos.commandMap",
|
||||
list(web_messages_zh["iwooos"].keys()),
|
||||
"commandMap",
|
||||
)
|
||||
assert_contains(
|
||||
"web_messages.en.iwooos.commandMap",
|
||||
list(web_messages_en["iwooos"].keys()),
|
||||
"commandMap",
|
||||
)
|
||||
for key in ["eyebrow", "title", "subtitle", "tabsLabel", "boundaryTitle", "panelLabels", "items"]:
|
||||
assert_contains(
|
||||
"web_messages.zh-TW.iwooos.commandMap.keys",
|
||||
list(web_messages_zh["iwooos"]["commandMap"].keys()),
|
||||
key,
|
||||
)
|
||||
assert_contains(
|
||||
"web_messages.en.iwooos.commandMap.keys",
|
||||
list(web_messages_en["iwooos"]["commandMap"].keys()),
|
||||
key,
|
||||
)
|
||||
for key in ["evidence", "next", "locked"]:
|
||||
assert_contains(
|
||||
"web_messages.zh-TW.iwooos.commandMap.panelLabels",
|
||||
list(web_messages_zh["iwooos"]["commandMap"]["panelLabels"].keys()),
|
||||
key,
|
||||
)
|
||||
assert_contains(
|
||||
"web_messages.en.iwooos.commandMap.panelLabels",
|
||||
list(web_messages_en["iwooos"]["commandMap"]["panelLabels"].keys()),
|
||||
key,
|
||||
)
|
||||
for key in expected_command_map_item_ids:
|
||||
assert_contains(
|
||||
"web_messages.zh-TW.iwooos.commandMap.items",
|
||||
list(web_messages_zh["iwooos"]["commandMap"]["items"].keys()),
|
||||
key,
|
||||
)
|
||||
assert_contains(
|
||||
"web_messages.en.iwooos.commandMap.items",
|
||||
list(web_messages_en["iwooos"]["commandMap"]["items"].keys()),
|
||||
key,
|
||||
)
|
||||
for field in ["title", "state", "detail", "evidence", "next", "locked"]:
|
||||
assert_contains(
|
||||
f"web_messages.zh-TW.iwooos.commandMap.items.{key}",
|
||||
list(web_messages_zh["iwooos"]["commandMap"]["items"][key].keys()),
|
||||
field,
|
||||
)
|
||||
assert_contains(
|
||||
f"web_messages.en.iwooos.commandMap.items.{key}",
|
||||
list(web_messages_en["iwooos"]["commandMap"]["items"][key].keys()),
|
||||
field,
|
||||
)
|
||||
assert_text_contains(
|
||||
"iwooos_page.first_unlock_evidence_packet_testid",
|
||||
iwooos_projection_page,
|
||||
|
||||
Reference in New Issue
Block a user