Include weather icon control refinements in v2.17.5
This commit is contained in:
1 parent
ab4a40ccd8
commit
48e8f3eb4b
3 files changed
+12
-2
No files matched your search
@@ -76,6 +76,15 @@ test('weather icons map exact WMO codes and fall back for missing or unsafe imag
|
||||
assert.match(weatherIcons.renderImage(sets[0].icons.clear, 48, 24), /object-fit:contain/);
|
||||
});
|
||||
|
||||
test('weather icon edit controls use the standard colour and save before cancel', function () {
|
||||
const html = require('../src/web/view').renderView('settings/weather-icons/list', {
|
||||
sets: [{ id: 'example', name: 'Example', enabled: true, conditions: [] }],
|
||||
currentUser: { permissionKeys: ['weather-icons.read', 'weather-icons.update'] }
|
||||
});
|
||||
assert.match(html, /class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#edit-set-example">Edit<\/button>/);
|
||||
assert.match(html, /<div class="modal-footer">\s*<button class="btn btn-primary" type="submit">Save<\/button>\s*<button class="btn btn-secondary" type="button" data-bs-dismiss="modal">Cancel<\/button>/);
|
||||
});
|
||||
|
||||
test('weather management template renders Assets and permission gated uploads', function () {
|
||||
const html = require('../src/web/view').renderView('settings/weather-icons/list', {
|
||||
title: 'Weather icons', active: 'weather-icons', assetsMenuOpen: true, conditions: library.CONDITIONS,
|
||||
|
||||
Reference in new issue
Block a user