Release 2.6.25
Publish Docker Image / build-and-push (./build/Dockerfile, git.lzstealth.com/lzstealth/pulse-signage-web, web) (push) Successful in 1m12s
Publish Docker Image / build-and-push (./build/Dockerfile.player, git.lzstealth.com/lzstealth/pulse-signage-player, player) (push) Successful in 30s
Publish Docker Image / build-and-push (./build/Dockerfile, git.lzstealth.com/lzstealth/pulse-signage-web, web) (push) Successful in 1m12s
Publish Docker Image / build-and-push (./build/Dockerfile.player, git.lzstealth.com/lzstealth/pulse-signage-player, player) (push) Successful in 30s
This commit is contained in:
@@ -39,6 +39,11 @@ test('playlist refresh queues updates until the next slide transition', async ()
|
||||
pausedRemainingMs: null,
|
||||
app: null,
|
||||
currentPlaylistEtag: '',
|
||||
initialData: {
|
||||
rssFeeds: [{ id: 1 }],
|
||||
apiSources: [{ id: 2 }],
|
||||
timetableGroups: [{ id: 3 }]
|
||||
},
|
||||
activeSlidesCacheKey: '',
|
||||
activeSlidesCacheValue: [],
|
||||
renderCacheViewportKey: '',
|
||||
@@ -94,6 +99,9 @@ test('playlist refresh queues updates until the next slide transition', async ()
|
||||
this.responseText = JSON.stringify({
|
||||
signature: 'next-signature',
|
||||
slides: [{ id: 1, duration_seconds: 12, disable_audio: false }],
|
||||
rssFeeds: [{ id: 10 }],
|
||||
apiSources: [{ id: 20 }],
|
||||
timetableGroups: [{ id: 30 }],
|
||||
playlist: { fade_between_slides: false, skip_unavailable_rtmp: false }
|
||||
});
|
||||
if (typeof this.onreadystatechange === 'function') {
|
||||
@@ -133,6 +141,9 @@ test('playlist refresh queues updates until the next slide transition', async ()
|
||||
assert.equal(calls.showCurrent, 0);
|
||||
assert.equal(sandbox.currentPlaylistSignature, 'old-signature');
|
||||
assert.equal(sandbox.slides[0].disable_audio, undefined);
|
||||
assert.deepEqual(sandbox.initialData.rssFeeds, [{ id: 10 }]);
|
||||
assert.deepEqual(sandbox.initialData.apiSources, [{ id: 20 }]);
|
||||
assert.deepEqual(sandbox.initialData.timetableGroups, [{ id: 30 }]);
|
||||
assert.equal(calls.logDebug.some((entry) => entry.includes('Unable to load screen playlist.')), false);
|
||||
assert.equal(calls.logDebug.some((entry) => entry.includes('applying on next slide transition')), true);
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ const assert = require('node:assert/strict');
|
||||
|
||||
const registerManageRoutes = require('../src/web/routes/admin/manage');
|
||||
|
||||
test('screen update redirects and forwards redirect when the slug changes', async () => {
|
||||
test('screen update keeps the existing slug on edit', async () => {
|
||||
const handlers = {};
|
||||
const app = {
|
||||
post(path, ...routeHandlers) {
|
||||
@@ -14,37 +14,13 @@ test('screen update redirects and forwards redirect when the slug changes', asyn
|
||||
|
||||
const pool = {
|
||||
async query(sql) {
|
||||
if (sql.includes('SELECT s.slug, s.player_id, p.public_base_url, p.internal_base_url') && sql.includes('WHERE s.slug = ?')) {
|
||||
return [[{
|
||||
slug: 'alpha',
|
||||
player_id: 'player-a',
|
||||
public_base_url: 'http://player.local',
|
||||
internal_base_url: 'http://player.internal'
|
||||
}]];
|
||||
}
|
||||
if (sql.includes('SELECT id, name, slug, playlist_id')) {
|
||||
return [[{ id: 42, name: 'Old Screen', slug: 'alpha', playlist_id: null }]];
|
||||
}
|
||||
if (sql.includes('SELECT s.slug, s.player_id, p.public_base_url, p.internal_base_url')) {
|
||||
return [[
|
||||
{
|
||||
slug: 'alpha',
|
||||
player_id: 'player-a',
|
||||
public_base_url: 'http://player-a.example',
|
||||
internal_base_url: 'http://player-a.internal'
|
||||
},
|
||||
{
|
||||
slug: 'beta',
|
||||
player_id: 'player-b',
|
||||
public_base_url: 'http://player-b.example',
|
||||
internal_base_url: 'http://player-b.internal'
|
||||
}
|
||||
]];
|
||||
}
|
||||
if (sql.includes('UPDATE d_screens SET name = ?, slug = ?, playlist_id = ?, player_id = ?, modified_by = ? WHERE id = ?')) {
|
||||
if (sql.includes('UPDATE d_screens SET name = ?, slug = ?, playlist_id = ?, modified_by = ? WHERE id = ?')) {
|
||||
return [{ affectedRows: 1 }];
|
||||
}
|
||||
return [[]];
|
||||
throw new Error(`Unexpected SQL: ${sql}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -137,7 +113,6 @@ test('screen update redirects and forwards redirect when the slug changes', asyn
|
||||
|
||||
assert.equal(res.redirectedTo, '/screens?edit=42');
|
||||
assert.deepEqual(calls, [
|
||||
{ kind: 'forwardPlayerCommandToBaseUrl', baseUrl: 'http://player.internal', slug: 'alpha', payload: { command: 'redirect', url: 'http://player.local/screen/beta' } },
|
||||
{ kind: 'redirectAfterSave', url: '/screens?edit=42' }
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -48,7 +48,22 @@ test('screen edit page includes shared launcher downloads and base player url',
|
||||
pages,
|
||||
buildDashboardState: async () => ({ screens: [] }),
|
||||
getScreenDeleteBlockMessage: async () => '',
|
||||
getScreenConnections: async () => [],
|
||||
getScreenConnections: async (slug) => {
|
||||
if (slug !== 'demo-conference') {
|
||||
return { connections: [] };
|
||||
}
|
||||
|
||||
return {
|
||||
connections: [
|
||||
{
|
||||
id: 'conn-1',
|
||||
clientId: 'conn-1',
|
||||
deviceId: 'device-1',
|
||||
playerPublicBaseUrl: 'http://player.example/'
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
playerPublicBaseUrl: 'http://player.example',
|
||||
requirePermission() {
|
||||
return function (_req, _res, next) {
|
||||
@@ -265,6 +280,8 @@ test('screen edit page renders player urls as an adminlte table', async () => {
|
||||
name: 'Demo Conference',
|
||||
slug: 'demo-conference',
|
||||
playlist_id: null,
|
||||
slug_update_confirm_live_connection_count: 2,
|
||||
slug_update_confirm_message: 'Are you sure you want to update the slug? This will refresh all screens using this slug.',
|
||||
player_urls: [
|
||||
{
|
||||
identifier: 'player-alpha',
|
||||
@@ -283,6 +300,8 @@ test('screen edit page renders player urls as an adminlte table', async () => {
|
||||
assert.match(html, /card-body table-responsive p-0/);
|
||||
assert.match(html, /table table-striped w-100 mb-0/);
|
||||
assert.match(html, /player-alpha/);
|
||||
assert.match(html, /<input[^>]+id="screen-slug"[^>]+disabled/);
|
||||
assert.match(html, /Slug cannot be changed after creation/);
|
||||
});
|
||||
|
||||
test('screen launcher downloads are shared and attached', async () => {
|
||||
|
||||
Reference in New Issue
Block a user