Private
Public Access
0
0

docs(conductor): Synchronize docs for track 'Context Composition Presets'

This commit is contained in:
2026-05-16 12:36:20 -04:00
parent c52e4612ae
commit fcc8822612
4 changed files with 122 additions and 30 deletions
+19 -1
View File
@@ -11,7 +11,20 @@ def test_gui_context_preset_save_load(live_gui) -> None:
test_files = ["test.py"]
test_screenshots = ["test.png"]
client.push_event("custom_callback", {"callback": "simulate_save_preset", "args": [preset_name]})
# Switch to Context Composition tab to ensure it's rendered
client.push_event("select_tab", {"tab": "Context Composition"})
time.sleep(1.0)
# Inject context state directly
client.push_event("custom_callback", {"callback": "set_context_files_for_test", "args": [test_files]})
client.push_event("custom_callback", {"callback": "set_screenshots_for_test", "args": [test_screenshots]})
client.push_event("custom_callback", {"callback": "set_ui_attr", "args": ["ui_new_context_preset_name", preset_name]})
time.sleep(1.0)
# Trigger Save (which will trigger validation, and since test.py doesn't exist, it opens a modal)
client.push_event("custom_callback", {"callback": "set_ui_attr", "args": ["_pending_save_ctx_click", True]})
time.sleep(1.0)
# The "Missing Files Warning" modal should be open. Trigger "Save Anyway".
client.push_event("custom_callback", {"callback": "set_ui_attr", "args": ["_pending_save_anyway_click", True]})
time.sleep(1.5)
project_data = client.get_project()
@@ -25,6 +38,11 @@ def test_gui_context_preset_save_load(live_gui) -> None:
assert preset_files == test_files
assert preset_entry.get("screenshots", []) == test_screenshots
# Clear current state
client.push_event("custom_callback", {"callback": "set_context_files_for_test", "args": [[]]})
client.push_event("custom_callback", {"callback": "set_screenshots_for_test", "args": [[]]})
time.sleep(1.0)
# Load the preset
client.push_event("custom_callback", {"callback": "load_context_preset", "args": [preset_name]})
time.sleep(1.0)