OpenWeb now opens the page in RynthCore's in-game web panel (plugin API v93) and falls back to the system browser only when the panel refused before navigating. A handle from OpenWebPanel only means queued, so the open is answered from OnTick (PollWeb), which reads GetWebPanelState until it decides: Loading/Ready opened; Failed+OpenedInBrowser the engine opened the browser (do nothing more); Failed+ProcessFailed spent; Failed+RuntimeMissing or CreateFailed with no browser and no navigation falls back. A 20 s poll timeout answers NoAnswer (neutral, no fallback). done fires exactly once. ServerWebPanel.cs is pure (an int/string engine seam), so the mappings and the once-only answer are tested with a fake engine. Every SDK web-panel name sits in four NoInlining helpers in ServerPackWeb.cs, each called inside catch (MissingMethodException) and catch (TypeLoadException); a source scan pins that, the poll's place in OnTick, and the absence of locks. CloseWeb closes only the handle this plugin opened. Builds only against a RynthCore SDK with the web panel (0ef12d7); against 418d80b the helpers do not compile (8 errors, all in ServerPackWeb.cs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
using RynthCore.RynthAiTests.Harness;
|
|
|
|
namespace RynthServerPack.Tests;
|
|
|
|
// Offline tests for the server plugins: the shared model and every server plugin's detection data.
|
|
//
|
|
// Run: dotnet run -c Release (all tests)
|
|
// dotnet run -c Release -- host (tests whose name contains "host")
|
|
internal static class Program
|
|
{
|
|
private static int Main(string[] args)
|
|
{
|
|
var runner = new Runner();
|
|
ServerPackModelTests.Register(runner);
|
|
ServerProjectsTests.Register(runner);
|
|
ServerPackHooksTests.Register(runner);
|
|
ConquestTests.Register(runner);
|
|
AelrynthTests.Register(runner);
|
|
VaultTests.Register(runner);
|
|
QuestPackTests.Register(runner);
|
|
LevistrasTests.Register(runner);
|
|
ServerPackCommandsTests.Register(runner);
|
|
DreamWeaveSkillsTests.Register(runner);
|
|
DreamWeaveTests.Register(runner);
|
|
ServerWebOpenTests.Register(runner);
|
|
ServerWebPanelTests.Register(runner);
|
|
DreamWeaveWebTests.Register(runner);
|
|
return runner.Run("RynthServerPack tests", args.Length > 0 ? args[0] : null);
|
|
}
|
|
}
|