From f8a0cb588f47828f24254ea6b4632410a6179590 Mon Sep 17 00:00:00 2001 From: iisaev Date: Wed, 4 Nov 2026 08:44:50 +0100 Subject: [PATCH] test: cover scenario editor timer reattachment Open a scenario, edit its buffer while the window is detached and verify refreshed metadata after reattachment without saving the file. --- .../windows/src/ToolWindowsExercises.cs | 32 +++++++++++++++++++ .../windows/src/ToolWindowsTestDriverNode.cs | 1 + 2 files changed, 33 insertions(+) diff --git a/test_suites/windows/src/ToolWindowsExercises.cs b/test_suites/windows/src/ToolWindowsExercises.cs index 54ac028..6d71d77 100644 --- a/test_suites/windows/src/ToolWindowsExercises.cs +++ b/test_suites/windows/src/ToolWindowsExercises.cs @@ -49,10 +49,42 @@ namespace Cthangover.Tools.Tests.Windows case "scenario_editor": var tree = Find(window)?.FindChildren("*", nameof(Tree), true, false).OfType().FirstOrDefault(); check(tree?.GetRoot()?.GetChildCount() > 0, "scenario_editor: file tree lists mods with scenarios"); + ScenarioTimerLifecycle(window, check); break; } } + /// Checks the debounced metadata after the detached window has re-entered the tree. + public static void Verify(string toolId, Window window, Action check) + { + if (toolId == "scenario_editor") + check(window.FindChildren("InfoScene", "", true, false).OfType