fix: apply direct runtime paths and respect taskbar

This commit is contained in:
2026-07-28 00:35:47 +09:00
parent e3b174eec7
commit 347900701b
16 changed files with 522 additions and 401 deletions

View File

@@ -163,6 +163,49 @@ public sealed class PlayoutOptionsLoaderTests
}
}
[Fact]
public void LoadDevelopmentLive_UsesTheFirstRunCutsPathWithoutCopyingIt()
{
using var environment = ClearedEnvironment()
.Set("MBN_STOCK_PLAYOUT_SCENE_DIRECTORY", "C:\\stale-scenes");
using var file = TemporaryJsonFile.Create(DevelopmentLiveBaseJson());
var executableRoot = Path.Combine(
Path.GetTempPath(),
Guid.NewGuid().ToString("N"),
"app");
var selectedCuts = Path.Combine(
Path.GetTempPath(),
Guid.NewGuid().ToString("N"),
"Cuts");
Directory.CreateDirectory(executableRoot);
Directory.CreateDirectory(selectedCuts);
try
{
var options = PlayoutOptionsLoader.LoadDevelopmentLive(
file.Path,
executableRoot,
selectedCuts);
Assert.Equal(Path.GetFullPath(selectedCuts), options.SceneDirectory);
Assert.Equal(
Path.GetFullPath(selectedCuts),
options.DevelopmentLiveExecutableSceneDirectory);
Assert.False(Directory.Exists(Path.Combine(executableRoot, "Cuts")));
var validated = ValidatedPlayoutOptions.Create(options);
Assert.Equal(Path.GetFullPath(selectedCuts), validated.SceneDirectory);
}
finally
{
Directory.Delete(
Path.GetDirectoryName(executableRoot)!,
recursive: true);
Directory.Delete(
Path.GetDirectoryName(selectedCuts)!,
recursive: true);
}
}
[Fact]
public void LoadDevelopmentLive_RejectsBaseProfileThatCanReconnect()
{