diff --git a/ErsatzTV.Core.Tests/Scheduling/Engine/SchedulingEngineTests.cs b/ErsatzTV.Core.Tests/Scheduling/Engine/SchedulingEngineTests.cs index b3d04fe12..6a892aa40 100644 --- a/ErsatzTV.Core.Tests/Scheduling/Engine/SchedulingEngineTests.cs +++ b/ErsatzTV.Core.Tests/Scheduling/Engine/SchedulingEngineTests.cs @@ -87,6 +87,9 @@ public class SchedulingEngineTests item.PlayoutId.ShouldBe(1); } + // outside an EPG group every item opens its own guide group + items.Select(i => i.GuideGroup).ShouldBe([1, 2, 3, 4]); + // 30 + 45 + 60 + 20 minutes of content TimeSpan scheduled = TimeSpan.FromMinutes(155); items[^1].Finish.ShouldBe(Start.UtcDateTime + scheduled); @@ -350,7 +353,8 @@ public class SchedulingEngineTests grouped.Select(i => i.GuideGroup).Distinct().Count().ShouldBe(1); grouped.ShouldAllBe(i => i.CustomTitle == "Block"); - items[3].GuideGroup.ShouldNotBe(grouped[0].GuideGroup); + // unlocking resumes per-item advancement from the group's number + items[3].GuideGroup.ShouldBe(grouped[0].GuideGroup + 1); items[3].CustomTitle.ShouldBeNull(); } diff --git a/ErsatzTV.Tests/Controllers/ScriptedScheduleControllerTests.cs b/ErsatzTV.Tests/Controllers/ScriptedScheduleControllerTests.cs index dcc3c4e52..8ec704b54 100644 --- a/ErsatzTV.Tests/Controllers/ScriptedScheduleControllerTests.cs +++ b/ErsatzTV.Tests/Controllers/ScriptedScheduleControllerTests.cs @@ -106,6 +106,9 @@ public class ScriptedScheduleControllerTests items[1].CustomTitle.ShouldBe("Morning Block"); items[2].CustomTitle.ShouldBeNull(); + // after stop_epg_group every item opens its own guide group again + items.Skip(2).Select(i => i.GuideGroup).ShouldBe(Enumerable.Range(2, 11)); + // pad_until_exact lands on the requested instant, whatever the machine offset is items[6].Finish.ShouldBe(new DateTime(2026, 1, 15, 10, 0, 0, DateTimeKind.Utc)); }