Files
hyprcrd/public/plugins/tests/search.test.js
thandClaude Opus 4.6 088c225202 runner: bump RUNNER_V ?v=3 → ?v=4 so test-shield removal loads
The test-shield (#test-shield) was added in loader.js (always fresh
via plugin manager ?v=time()) but the removal lives in runner.js
hideProgress(). runner.js was still cached at ?v=3 in the browser,
so the shield stayed after the run. Bumping to ?v=4 in loader.js +
all 42 test files forces a fresh runner.js load.

chore: bump version to 0.9.15

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:04:23 +02:00

47 lines
1.3 KiB
JavaScript

import { describe, it, afterEach, expect, $, click, type, pressKey, sleep, closeAll } from './runner.js?v=4';
describe('Search', () => {
afterEach(() => closeAll());
it('opens with Ctrl+K', async () => {
pressKey('k', { ctrlKey: true });
await sleep(150);
expect($('#search')).toBeVisible();
});
it('opens with search button', async () => {
click('#search-btn');
await sleep(150);
expect($('#search')).toBeVisible();
});
it('input is focused on open', async () => {
click('#search-btn');
await sleep(150);
expect(document.activeElement).toBe($('#search-input'));
});
it('has input and results area', async () => {
click('#search-btn');
await sleep(100);
expect($('#search-input')).toExist();
expect($('#search-results')).toExist();
});
it('typing triggers results render', async () => {
click('#search-btn');
await sleep(100);
type('#search-input', 'a');
await sleep(250);
expect($('#search-results')).toExist();
});
it('closes with ESC', async () => {
click('#search-btn');
await sleep(100);
pressKey('Escape');
await sleep(150);
expect($('#search')).toBeHidden();
});
});