From f3157210eb5f2f84fcbc225964f69f5aab5b6328 Mon Sep 17 00:00:00 2001 From: iisaev Date: Wed, 4 Nov 2026 08:44:52 +0100 Subject: [PATCH] test: update main game launch and hot reload coverage Enter through LauncherPlay and reload cthangover_game, which owns the starter party. Report missing mods, incompatible versions and collection problems when a game is unavailable. --- test_suites/new_game/manifest.json | 2 +- test_suites/new_game/src/NewGameTestDriverNode.cs | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test_suites/new_game/manifest.json b/test_suites/new_game/manifest.json index 0ed79e0..62bf8f5 100644 --- a/test_suites/new_game/manifest.json +++ b/test_suites/new_game/manifest.json @@ -1,6 +1,6 @@ { "name": "New Game Flow Test", - "description": "End-to-end play like a player in one process: front-end menu → Play → the cthangover card → New game → in-process mod-set switch → the prologue in prolog_alley with Marao's dialog → in-game hot reload of cthangover_party (session restored) → menu → novel_template → menu → cthangover again; every released mod context must be collected. Activated only by --itest=new_game (with --frontend).", + "description": "End-to-end play like a player in one process: front-end menu → Play → the cthangover card → New game → in-process mod-set switch → the prologue in prolog_alley with Marao's dialog → in-game hot reload of cthangover_game (session restored) → menu → novel_template → menu → cthangover again; every released mod context must be collected. Activated only by --itest=new_game (with --frontend).", "sources": [ "src/*.cs" ] diff --git a/test_suites/new_game/src/NewGameTestDriverNode.cs b/test_suites/new_game/src/NewGameTestDriverNode.cs index 26a94a5..6f491cc 100644 --- a/test_suites/new_game/src/NewGameTestDriverNode.cs +++ b/test_suites/new_game/src/NewGameTestDriverNode.cs @@ -21,7 +21,7 @@ namespace Mods.NewGameTest /// once done, Play → the cthangover card → New game: the /// process switches to the game, enters prolog_alley and the opening /// dialog about the hungover Marao is clicked through. - /// Hot reload inside the game (forced reload of cthangover_party): + /// Hot reload inside the game (forced reload of cthangover_game): /// the session is parked, the mod reloads into a new context and the game /// comes back in prolog_alley. /// Back to the menu → novel_template: mods outside that game are @@ -41,7 +41,7 @@ namespace Mods.NewGameTest private const string MainGame = "cthangover"; private const string SecondGame = "novel_template"; private const string PrologScene = "prolog_alley"; - private const string HotReloadedMod = "cthangover_party"; + private const string HotReloadedMod = "cthangover_game"; private const float TimeoutSeconds = 420f; private readonly List failures = new(); @@ -106,6 +106,12 @@ namespace Mods.NewGameTest switch (step) { case 0: + // The launcher precedes MainMenu; let its Play action enter the menu before waiting for warm-up. + if (Boot.IsReady && GetTree().CurrentScene?.FindChild("LauncherPlay", true, false) is Button) + { + PressMenuPlay(); + return; + } // The menu compiles the games' mods in the background; the switch // below must then only load them from the cache (see the log). if (!Boot.IsReady || GetTree().CurrentScene is not Cthangover.BaseMenu.MainMenu || GameSession.IsWarmingUp) @@ -243,6 +249,8 @@ namespace Mods.NewGameTest if (picker?.Visible != true) return false; var game = FindGame(gameId); + if (game != null && !game.IsReady) + GameLogger.Log("TEST", $"NewGameTest: unavailable '{gameId}': missing=[{string.Join(", ", game.MissingIds)}], versions=[{string.Join(", ", game.MismatchIds)}], collection problems={game.ProblemsCount}"); Check($"game '{gameId}' is listed and ready", game?.IsReady == true); var start = StartButton(picker, game?.Name ?? gameId); Check($"'{gameId}' card has an enabled New game button", start is { Disabled: false });