Format scheduled task intervals
Publish Docker Image / build-and-push (./build/Dockerfile, git.lzstealth.com/lzstealth/pulse-signage-web, web) (push) Successful in 1m25s
Publish Docker Image / build-and-push (./build/Dockerfile.player, git.lzstealth.com/lzstealth/pulse-signage-player, player) (push) Successful in 32s
Publish Docker Image / build-and-push (./build/Dockerfile, git.lzstealth.com/lzstealth/pulse-signage-web, web) (push) Successful in 1m25s
Publish Docker Image / build-and-push (./build/Dockerfile.player, git.lzstealth.com/lzstealth/pulse-signage-player, player) (push) Successful in 32s
This commit is contained in:
@@ -91,4 +91,44 @@ test('background task pages opt into 24-hour timestamps, confirm clearing tasks,
|
||||
assert.match(queueDateSearchHtml, /Example task/);
|
||||
assert.match(scheduledHtml, /data-local-datetime-format="24h"/);
|
||||
assert.match(scheduledHtml, /Player:\s+Player Beta/);
|
||||
});
|
||||
|
||||
test('scheduled task interval labels use the largest exact unit while sorting stays numeric', () => {
|
||||
const scheduledHtml = renderBackgroundTasksScheduledPage(
|
||||
{
|
||||
recurringTasks: [
|
||||
{
|
||||
title: 'Hourly task',
|
||||
key: 'hourly',
|
||||
intervalMs: 7200000,
|
||||
metadata: {}
|
||||
},
|
||||
{
|
||||
title: 'Second task',
|
||||
key: 'seconds',
|
||||
intervalMs: 3000,
|
||||
metadata: {}
|
||||
},
|
||||
{
|
||||
title: 'Minute task',
|
||||
key: 'minutes',
|
||||
intervalMs: 60000,
|
||||
metadata: {}
|
||||
}
|
||||
],
|
||||
sort: 'interval',
|
||||
direction: 'asc',
|
||||
summary: { counts: {}, total: 3, activeCount: 0, scheduledCount: 3 }
|
||||
},
|
||||
'',
|
||||
{
|
||||
permissions: ['scheduled-tasks.allow']
|
||||
}
|
||||
);
|
||||
|
||||
assert.match(scheduledHtml, /Every 3 seconds/);
|
||||
assert.match(scheduledHtml, /Every minute/);
|
||||
assert.match(scheduledHtml, /Every 2 hours/);
|
||||
assert.ok(scheduledHtml.indexOf('Every 3 seconds') < scheduledHtml.indexOf('Every minute'));
|
||||
assert.ok(scheduledHtml.indexOf('Every minute') < scheduledHtml.indexOf('Every 2 hours'));
|
||||
});
|
||||
Reference in New Issue
Block a user