Release v2.18.0: template default content
This commit is contained in:
1 parent
48e8f3eb4b
commit
24f1603b43
54 files changed
+1421
-151
No files matched your search
@@ -1,6 +1,7 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const path = require('node:path');
|
||||
const fs = require('node:fs');
|
||||
const Handlebars = require('handlebars');
|
||||
|
||||
const { registerHandlebars } = require('../src/web/handlebars');
|
||||
@@ -69,4 +70,23 @@ test('save action buttons keep the new action wired for create pages', () => {
|
||||
|
||||
assert.match(html, /name="save_action" value="new">Save and New<\/button>/);
|
||||
assert.match(html, /name="save_action" value="close">Save and Close<\/button>/);
|
||||
});
|
||||
|
||||
test('playlist slide picker follows confirm then cancel button conventions', () => {
|
||||
const source = fs.readFileSync(path.join(__dirname, '..', 'src', 'web', 'views', 'signage', 'playlists', 'form.hbs'), 'utf8');
|
||||
|
||||
assert.match(source, /<button type="button" class="btn btn-success" id="playlist-confirm-add-slides" disabled>Add selected slides<\/button>\s*<button type="button" class="btn btn-warning" data-bs-dismiss="modal">Cancel<\/button>/);
|
||||
});
|
||||
|
||||
test('playlist schedule actions are separate spaced buttons', () => {
|
||||
const source = fs.readFileSync(path.join(__dirname, '..', 'src', 'web', 'views', 'signage', 'playlists', 'slide-config.hbs'), 'utf8');
|
||||
|
||||
assert.match(source, /<div class="card-footer d-flex justify-content-end gap-2">\s*<button type="submit" class="btn btn-primary">Save schedule<\/button>\s*<button type="button" class="btn btn-warning" data-schedule-cancel/);
|
||||
assert.doesNotMatch(source, /\bbtn-group\b/);
|
||||
});
|
||||
|
||||
test('playlist schedule footer excludes the clearfix spacer from its flex actions', () => {
|
||||
const source = fs.readFileSync(path.join(__dirname, '..', 'src', 'web', 'public', 'css', 'theme-custom.css'), 'utf8');
|
||||
|
||||
assert.match(source, /^\.slide-schedule-card > form > \.card-footer::after\s*\{\s*content: none;\s*\}/m);
|
||||
});
|
||||
Reference in new issue
Block a user