Fix player cached images and blank time dates
This commit is contained in:
@@ -62,4 +62,23 @@ test('time/date region renders placeholder tokens on the player side', () => {
|
||||
);
|
||||
|
||||
assert.match(markup, /<p>\d{2}:\d{2}<\/p>/);
|
||||
});
|
||||
|
||||
test('time/date region stays blank when its format is blank', () => {
|
||||
const module = loadTimeDateModule();
|
||||
const markup = module.renderRegion(
|
||||
{
|
||||
pixelWidth: 320,
|
||||
pixelHeight: 180,
|
||||
canvasScale: 1,
|
||||
baseStyle: 'position:absolute;'
|
||||
},
|
||||
{
|
||||
value: '',
|
||||
timezone: 'UTC'
|
||||
}
|
||||
);
|
||||
|
||||
assert.match(markup, /data-time-date-format=""/);
|
||||
assert.doesNotMatch(markup, /<p>\d{2}:\d{2}<\/p>/);
|
||||
});
|
||||
Reference in New Issue
Block a user