Private
Public Access
0
0

test: Fix assertions after GUI state unification

- Update test_gui_symbol_navigation.py and test_gui_text_viewer.py to assert against show_windows['Text Viewer'] instead of the deprecated show_text_viewer attribute.
- Increase synchronization wait time in test_visual_sim_gui_ux.py to ensure the GUI loop accurately reflects the mocked MMA status.
This commit is contained in:
2026-06-02 02:20:07 -04:00
parent 6e0d002d05
commit 964b5c5aa4
7 changed files with 240 additions and 29 deletions
+7 -21
View File
@@ -198,11 +198,8 @@ class App:
self._pending_save_ctx_click = False
self._pending_save_anyway_click = False
self.show_missing_files_modal = False
self.show_structural_editor_modal = False
self.missing_context_files = []
self.target_context_preset_name = ""
self.show_empty_context_warning_modal = False
self._pending_proceed_generate = False
self._pending_proceed_md_only = False
self._new_preset_name = ""
self._editing_preset_name = ""
self._editing_preset_system_prompt = ""
@@ -3184,24 +3181,12 @@ def render_context_files_table(app: App) -> None:
imgui.same_line()
imgui.text_colored(imgui.ImVec4(1.0, 0.0, 0.0, 1.0), "[MISSING]")
if f_path.lower().endswith(('.c', '.cpp', '.h', '.hpp', '.cxx', '.cc')):
if f_path.lower().endswith(('.py', '.c', '.cpp', '.h', '.hpp', '.cxx', '.cc')):
imgui.same_line()
if imgui.button(f"[Inspect]##{i}"):
if imgui.button(f"[Structure]##{i}"):
app.ui_editing_slices_file = f_item
app.ui_inspecting_ast_file = f_item
app._show_ast_inspector = True
imgui.same_line()
if imgui.button(f"[Slices]##{i}"):
app.ui_editing_slices_file = f_item
f_path = f_item.path if hasattr(f_item, "path") else str(f_item)
app.text_viewer_title = f"Slices: {f_path}"
try:
app.text_viewer_content = mcp_client.read_file(f_path)
except Exception as e:
app.text_viewer_content = f"Error reading file: {e}"
app.text_viewer_type = 'cpp' if f_path.endswith(('.cpp', '.hpp', '.h')) else 'python' if f_path.endswith('.py') else 'text'
app.show_windows["Text Viewer"] = True
app.show_windows["Text Viewer"] = True
app.show_structural_editor_modal = True
imgui.table_set_column_index(1)
if not hasattr(f_item, "view_mode"): f_item.view_mode = "summary"
@@ -5483,7 +5468,8 @@ def render_context_modals(app: App) -> None:
imgui.end_popup()
render_ast_inspector_modal(app)
from src.structural_editor_modal import render_structural_file_editor_modal
render_structural_file_editor_modal(app)
def _get_context_composition_state(app: App) -> tuple:
files_state = []