Use minute precision for timetable date filters
This commit is contained in:
1 parent
05c9341b08
commit
0e77998e92
3 files changed
+9
-3
No files matched your search
@@ -139,8 +139,10 @@ test('timetable date controls default to all and pass unsaved date ranges to pre
|
||||
assert.match(html, /<option value="all" selected>All<\/option>/);
|
||||
assert.match(html, /data-timetable-date-range hidden/);
|
||||
assert.match(html, /data-timetable-date="date_from"[^>]* disabled/);
|
||||
const saved = { date_filter: 'between', date_from: '2099-08-20T10:00:00.000Z', date_to: '' };
|
||||
const saved = { date_filter: 'between', date_from: '2099-08-20T10:00:45.000Z', date_to: '' };
|
||||
const enabled = module.renderEditorCard({ region, current: saved, timetableGroups: [] });
|
||||
assert.equal((enabled.match(/type="datetime-local" step="60"/g) || []).length, 2);
|
||||
assert.match(enabled, /data-timetable-date="date_from" value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}"/);
|
||||
assert.match(enabled, /<option value="between" selected>Between Dates<\/option>/);
|
||||
assert.doesNotMatch(enabled, /data-timetable-date-range hidden/);
|
||||
assert.doesNotMatch(enabled, /data-timetable-date="date_from"[^>]* disabled/);
|
||||
|
||||
Reference in new issue
Block a user