Files
hyprcrd/public/plugins/tests/notifications.test.js
T
2026-04-10 07:57:53 +02:00

33 lines
1002 B
JavaScript

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);
});
});