Release v2.17.4: add API region sorting and indexed placeholders
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile, web, pulse-signage-web) (push) Successful in 1m17s
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile.player, player, pulse-signage-player) (push) Successful in 1m10s

This commit is contained in:
lzstealth committed 2026-10-23 20:54:15 +01:00
1 parent bc8075379a
commit 46636939de
18 files changed
+709 -232

No files matched your search

+14
View File
@@ -218,6 +218,20 @@ test('shared API item selection treats object paths as one item and preserves ar
assert.equal(JSON.stringify(sandbox.window.placeholderUtils.resolveApiItems(response, 'data')), JSON.stringify([campaign]));
});
test('shared API item sorting supports nested numeric and text fields with stable ties and missing values last', () => {
const helpers = require('../src/web/public/js/shared/placeholder-utils');
const rows = [
{ name: 'First', stats: { kills: 8 } },
{ name: 'Second', stats: { kills: 12 } },
{ name: 'Third', stats: { kills: 12 } },
{ name: 'Missing' }
];
assert.deepEqual(helpers.sortApiItems(rows, 'stats.kills', 'desc').map((item) => item.name), ['Second', 'Third', 'First', 'Missing']);
assert.deepEqual(helpers.sortApiItems(rows, 'name', 'asc').map((item) => item.name), ['First', 'Missing', 'Second', 'Third']);
assert.deepEqual(helpers.sortApiItems(rows, '', 'desc'), rows);
assert.deepEqual(helpers.sortApiItems(rows, 'stats.kills', 'asc').map((item) => item.name), ['First', 'Second', 'Third', 'Missing']);
});
test('API editor and player resolve object paths, root overrides, and numeric placeholders consistently', () => {
let editor;
const campaign = { name: 'Campaign', amount_raised: { value: '200' }, goal: { value: '1000' } };