test: Add GUI integration tests for external editor with live_gui fixture

Note: Due to process boundaries (GUI runs in subprocess), monkeypatch doesn't
cross to GUI subprocess. Manual verification requires configuring
config.toml in project root with VSCode path.
This commit is contained in:
2026-05-07 20:42:36 -04:00
parent fbd9e07f68
commit b70b837885
2 changed files with 115 additions and 269 deletions
+3 -1
View File
@@ -129,7 +129,8 @@ class App:
self.controller._predefined_callbacks['set_ui_screenshot_paths'] = lambda p: setattr(self, 'ui_screenshot_paths', p)
self.controller._clickable_actions.update({
'btn_undo': self._handle_undo,
'btn_redo': self._handle_redo
'btn_redo': self._handle_redo,
'btn_open_external_editor': self._open_patch_in_external_editor,
})
def simulate_save_preset(name: str):
from src import models
@@ -2229,6 +2230,7 @@ class App:
self._patch_error_message = str(e)
def _open_patch_in_external_editor(self) -> None:
self._external_editor_clicked = True
try:
from src.external_editor import get_default_launcher, create_temp_modified_file
import os