fix: make timeline activation durable and visible
This commit is contained in:
@@ -589,6 +589,30 @@ describe("authoritative playback", () => {
|
||||
expect(announcements.resolveRequests.length).toBe(callsBefore);
|
||||
});
|
||||
|
||||
it("keeps the active timeline through a complete playback-service restart", async () => {
|
||||
const group = await seedGroup();
|
||||
const timeline = await seedPattern();
|
||||
await service.activate(group.group.id, timeline.timeline.id, "now");
|
||||
const before = await service.snapshot(group.group.id);
|
||||
|
||||
service.stop();
|
||||
clock += 2000;
|
||||
service = createPlaybackService({
|
||||
newId,
|
||||
now: () => clock,
|
||||
registry,
|
||||
setTimer: () => undefined,
|
||||
settings: { ...SIGNAGE_DEFAULT_SETTINGS, playbackHistoryLimit: 20 },
|
||||
store,
|
||||
});
|
||||
await service.start();
|
||||
|
||||
const after = await service.snapshot(group.group.id);
|
||||
expect(after.activeTimelineId).toBe(timeline.timeline.id);
|
||||
expect(after.currentSelectionId).toBe(before.currentSelectionId);
|
||||
expect(after.deadlineAtMs).toBe(before.deadlineAtMs);
|
||||
});
|
||||
|
||||
it("publishes a compact snapshot, with no payload or timeline in it", async () => {
|
||||
const group = await seedGroup();
|
||||
const timeline = await seedPattern();
|
||||
|
||||
Reference in New Issue
Block a user