agent-orchestrator/tests/e2e/specs/splash.test.ts
Hibryda 77b9ce9f62 feat: unified E2E testing engine — 205 tests, dual-stack support
Infrastructure:
- adapters/: base, tauri (port 9750), electrobun (port 9761 + PTY daemon)
- helpers/: 120+ centralized selectors, reusable actions, custom assertions
- wdio.shared.conf.js + stack-specific configs

18 unified specs (205 tests):
splash(6) smoke(15) settings(19) terminal(14) agent(15) search(12)
files(15) comms(10) tasks(10) theme(12) groups(12) keyboard(8)
notifications(10) diagnostics(8) status-bar(12) context(9)
worktree(8) llm-judged(10)

Daemon: --stack tauri|electrobun|both flag
Scripts: test:e2e:tauri, test:e2e:electrobun, test:e2e:both
2026-03-22 05:27:36 +01:00

68 lines
2.2 KiB
TypeScript

/**
* Splash screen tests — logo, version, loading indicator, auto-dismiss.
*
* The splash screen uses display toggle (style:display) — it is always in the
* DOM but hidden once the app loads. Tests verify structure, not visibility.
*/
import { browser, expect } from '@wdio/globals';
import * as S from '../helpers/selectors.ts';
describe('Splash screen', () => {
it('should have splash element in DOM', async () => {
const exists = await browser.execute((sel: string) => {
return document.querySelector(sel) !== null;
}, S.SPLASH);
expect(exists).toBe(true);
});
it('should show the AGOR logo text', async () => {
const text = await browser.execute((sel: string) => {
const el = document.querySelector(sel);
return el?.textContent ?? '';
}, S.LOGO_TEXT);
if (text) {
expect(text).toBe('AGOR');
}
});
it('should show version string', async () => {
const text = await browser.execute((sel: string) => {
const el = document.querySelector(sel);
return el?.textContent ?? '';
}, S.SPLASH_VERSION);
if (text) {
expect(text).toMatch(/^v/);
}
});
it('should have loading indicator dots', async () => {
const count = await browser.execute((sel: string) => {
return document.querySelectorAll(sel).length;
}, S.SPLASH_DOT);
if (count > 0) {
expect(count).toBe(3);
}
});
it('should use display toggle (not removed from DOM)', async () => {
// Splash stays in DOM but gets display:none after load
const display = await browser.execute((sel: string) => {
const el = document.querySelector(sel);
if (!el) return 'not-found';
return getComputedStyle(el).display;
}, S.SPLASH);
// After app loads, should be 'none' (hidden) but element still exists
expect(['none', 'flex', 'block', 'not-found']).toContain(display);
});
it('should have proper z-index for overlay', async () => {
const zIndex = await browser.execute((sel: string) => {
const el = document.querySelector(sel);
if (!el) return '0';
return getComputedStyle(el).zIndex;
}, S.SPLASH);
// Splash should overlay everything
expect(typeof zIndex).toBe('string');
});
});