Document time date placeholder transforms
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile, web, pulse-signage-web) (push) Successful in 1m15s
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile.player, player, pulse-signage-player) (push) Successful in 35s

This commit is contained in:
2026-09-14 00:07:49 +01:00
parent 222162df57
commit 1e317997c4
4 changed files with 32 additions and 3 deletions
+25
View File
@@ -64,6 +64,31 @@ test('time/date region renders placeholder tokens on the player side', () => {
assert.match(markup, /<p>\d{2}:\d{2}<\/p>/);
});
test('time/date lowercase day period renders in lowercase', () => {
const module = loadTimeDateModule();
const markup = module.renderRegion(
{
pixelWidth: 320,
pixelHeight: 180,
canvasScale: 1,
baseStyle: 'position:absolute;'
},
{
value: '{{a}}',
timezone: 'UTC'
}
);
assert.match(markup, /<p>(am|pm)<\/p>/);
});
test('time/date editor popup documents text and math transforms', () => {
const editorSource = fs.readFileSync(require.resolve('../src/web/public/js/regions/type/time-date.js'), 'utf8');
assert.match(editorSource, /renderTextTransforms\(\)/);
assert.match(editorSource, /renderMathTransforms\(\)/);
});
test('time/date region stays blank when its format is blank', () => {
const module = loadTimeDateModule();
const markup = module.renderRegion(