Release v2.15.2
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile, web, pulse-signage-web) (push) Successful in 4m34s
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile.player, player, pulse-signage-player) (push) Successful in 57s

This commit is contained in:
lzstealth committed 2026-10-15 01:50:39 +01:00
1 parent ddcc665f81
commit 7295f83f04
43 files changed
+2526 -104

No files matched your search

+51
View File
@@ -1003,6 +1003,57 @@ test('player page arrow keys move between slides', async () => {
assert.deepEqual(calls, [0, 2]);
});
test('manual forward wrap advances the playlist group pass', () => {
const handlers = Object.create(null);
const calls = [];
const firstPassSlides = [{ id: 1 }, { id: 2 }];
const nextPassSlides = [{ id: 3 }, { id: 4 }];
const sandbox = {
window: null,
console,
Array,
Object,
String,
Boolean,
Number,
Math,
Date,
JSON,
Promise,
setTimeout,
clearTimeout,
location: { origin: 'http://localhost', href: 'http://localhost/screen/test2' },
addEventListener(type, handler) { handlers[type] = handler; },
slides: firstPassSlides,
lastRenderedSlide: { id: 2 },
index: 1,
playlistPassNumber: 0,
timer: null,
slideOutroTimers: [],
getCurrentActiveSlides() { return sandbox.playlistPassNumber ? nextPassSlides : firstPassSlides; },
clearSlideTimer() {},
clearActiveSlidesCache() {},
applyPendingPlaylistUpdate() {},
renderSlideAtIndex(sourceSlides, targetIndex) { calls.push({ sourceSlides, targetIndex }); }
};
sandbox.window = sandbox;
const scriptPath = path.join(__dirname, '..', 'src', 'player', 'public', 'js', 'player-page-commands.js');
vm.runInNewContext(fs.readFileSync(scriptPath, 'utf8'), sandbox, { filename: scriptPath });
sandbox.navigateSlides(1);
assert.equal(sandbox.playlistPassNumber, 1);
assert.deepEqual(calls, [{ sourceSlides: nextPassSlides, targetIndex: 0 }]);
const repeated = [{ id: 1 }, { id: 2 }, { id: 1 }, { id: 2 }, { id: 9 }];
sandbox.getCurrentActiveSlides = () => repeated;
sandbox.index = 3;
sandbox.lastRenderedSlide = { id: 2 };
sandbox.navigateSlides(1);
assert.equal(calls.at(-1).targetIndex, 4);
sandbox.navigateSlides(-1);
assert.equal(calls.at(-1).targetIndex, 2);
});
test('playlist removal of the current slide queues without rerendering it immediately', async () => {
const calls = {
showCurrent: 0,