UI-tests und fixes aus tests

This commit is contained in:
th committed 2026-04-09 22:18:45 +02:00
1 parent 73da8fb849
commit 968d980be1
46 files changed
+3853 -61

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
import { describe, it, expect, $ } from './runner.js';
describe('Notification Banner', () => {
it('banner element exists', () => {
expect($('#upcoming-banner')).toExist();
});
it('notification settings in localStorage', () => {
// Settings should exist or default to null (both valid)
const settings = localStorage.getItem('hyprcrd-notif-settings');
if (settings) {
const parsed = JSON.parse(settings);
expect(parsed).toExist();
} else {
expect(true).toBe(true); // defaults are fine
}
});
});
describe('Notification Settings', () => {
it('lookahead select has options', () => {
const sel = $('#notif-lookahead');
expect(sel).toExist();
expect(sel.options.length).toBeGreaterThan(2);
});
it('time select has options', () => {
const sel = $('#notif-time');
expect(sel).toExist();
expect(sel.options.length).toBeGreaterThan(2);
});
});