Release v2.17.0: add read-only user previews and access fallbacks
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile, web, pulse-signage-web) (push) Successful in 1m47s
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile.player, player, pulse-signage-player) (push) Successful in 32s

This commit is contained in:
lzstealth committed 2026-10-23 01:55:33 +01:00
1 parent 11dd801f6d
commit 9c28eca3ef
52 files changed
+1624 -140

No files matched your search

+50
View File
@@ -7,6 +7,8 @@ const packageJson = require('../package.json');
const pages = require('../src/web/pages');
const registerAboutRoutes = require('../src/web/routes/settings/about/routes');
const renderAboutPage = require('../src/web/routes/settings/about');
const registerChangelogRoutes = require('../src/web/routes/settings/changelog/routes');
const renderChangelogPage = require('../src/web/routes/settings/changelog');
test('about page renders the footer link beside the version and lists bundled libraries', () => {
const html = pages.renderAboutPage({ id: 1 });
@@ -27,6 +29,10 @@ test('about page renders the footer link beside the version and lists bundled li
assert.match(html, new RegExp('v' + packageJson.version.split('.').join('\\.')));
assert.match(html, /About Pulse/);
assert.match(html, /href="\/settings\/about"/);
assert.match(html, /href="\/settings\/changelog"/);
assert.match(html, />Changelog<\/a>/);
assert.match(html, /bi-git me-1/);
assert.doesNotMatch(html, /bi-github/);
libraries.forEach(function (library) {
assert.ok(library.version, `${library.name} version is missing`);
assert.match(html, new RegExp(`>${library.version}<`));
@@ -62,4 +68,48 @@ test('about route sends the about page', async () => {
await handlers['/settings/about'][0]({ currentUser: { id: 7 } }, response, function () {});
assert.equal(response.body, 'about-page');
});
test('changelog page renders release notes from the project changelog', () => {
const html = pages.renderChangelogPage({ id: 1 });
const parsed = renderChangelogPage.parseChangelog('## 1.2.3 - 2026-01-02\n\n### Added\n\n- New feature');
assert.ok(parsed.length > 0);
assert.equal(parsed[0].version, '1.2.3');
assert.equal(parsed[0].sections[0].items[0], 'New feature');
assert.match(html, /Changelog/);
assert.match(html, new RegExp(packageJson.version.replaceAll('.', '\\.')));
assert.match(html, /Updates and fixes across Pulse Signage releases/);
assert.match(html, /<details class="changelog-release"[^>]*open/);
assert.match(html, /Latest release/);
assert.match(html, /API source Enable\/Disable action/);
});
test('changelog route sends the changelog page', async () => {
const handlers = {};
const app = {
get(path, ...routeHandlers) {
handlers[path] = routeHandlers;
}
};
registerChangelogRoutes(app, {
pages: {
renderChangelogPage(currentUser) {
return currentUser && currentUser.id === 7 ? 'changelog-page' : 'unexpected';
}
}
});
const response = {
body: null,
send(value) {
this.body = value;
return this;
}
};
await handlers['/settings/changelog'][0]({ currentUser: { id: 7 } }, response, function () {});
assert.equal(response.body, 'changelog-page');
});