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
This commit is contained in:
parent
1995f03682
commit
77b9ce9f62
31 changed files with 3547 additions and 344 deletions
114
tests/e2e/specs/status-bar.test.ts
Normal file
114
tests/e2e/specs/status-bar.test.ts
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
* Status bar tests — agent counts, burn rate, attention queue, tokens, cost.
|
||||
*/
|
||||
|
||||
import { browser, expect } from '@wdio/globals';
|
||||
import * as S from '../helpers/selectors.ts';
|
||||
import { assertStatusBarComplete } from '../helpers/assertions.ts';
|
||||
|
||||
describe('Status bar', () => {
|
||||
it('should be visible at the bottom', async () => {
|
||||
await assertStatusBarComplete();
|
||||
});
|
||||
|
||||
it('should show version text', async () => {
|
||||
const text = await browser.execute(() => {
|
||||
const el = document.querySelector('.status-bar .version');
|
||||
return el?.textContent?.trim() ?? '';
|
||||
});
|
||||
if (text) {
|
||||
expect(text.length).toBeGreaterThan(0);
|
||||
}
|
||||
});
|
||||
|
||||
it('should show agent state counts', async () => {
|
||||
const exists = await browser.execute((sel: string) => {
|
||||
return document.querySelector(sel) !== null;
|
||||
}, S.AGENT_COUNTS);
|
||||
expect(typeof exists).toBe('boolean');
|
||||
});
|
||||
|
||||
it('should show burn rate', async () => {
|
||||
const exists = await browser.execute((sel: string) => {
|
||||
return document.querySelector(sel) !== null;
|
||||
}, S.BURN_RATE);
|
||||
expect(typeof exists).toBe('boolean');
|
||||
});
|
||||
|
||||
it('should show attention queue dropdown', async () => {
|
||||
const exists = await browser.execute((sel: string) => {
|
||||
return document.querySelector(sel) !== null;
|
||||
}, S.ATTENTION_QUEUE);
|
||||
expect(typeof exists).toBe('boolean');
|
||||
});
|
||||
|
||||
it('should show total tokens', async () => {
|
||||
const exists = await browser.execute((sel: string) => {
|
||||
return document.querySelector(sel) !== null;
|
||||
}, S.FLEET_TOKENS);
|
||||
expect(typeof exists).toBe('boolean');
|
||||
});
|
||||
|
||||
it('should show total cost', async () => {
|
||||
const exists = await browser.execute((sel: string) => {
|
||||
return document.querySelector(sel) !== null;
|
||||
}, S.FLEET_COST);
|
||||
expect(typeof exists).toBe('boolean');
|
||||
});
|
||||
|
||||
it('should show project count', async () => {
|
||||
const exists = await browser.execute((sel: string) => {
|
||||
return document.querySelector(sel) !== null;
|
||||
}, S.PROJECT_COUNT);
|
||||
expect(typeof exists).toBe('boolean');
|
||||
});
|
||||
|
||||
it('should have proper height and layout', async () => {
|
||||
const dims = await browser.execute(() => {
|
||||
const el = document.querySelector('[data-testid="status-bar"]')
|
||||
?? document.querySelector('.status-bar');
|
||||
if (!el) return null;
|
||||
const rect = el.getBoundingClientRect();
|
||||
return { width: rect.width, height: rect.height };
|
||||
});
|
||||
if (dims) {
|
||||
expect(dims.width).toBeGreaterThan(0);
|
||||
expect(dims.height).toBeGreaterThan(0);
|
||||
expect(dims.height).toBeLessThan(100); // Should be a compact bar
|
||||
}
|
||||
});
|
||||
|
||||
it('should use theme colors', async () => {
|
||||
const bg = await browser.execute(() => {
|
||||
const el = document.querySelector('[data-testid="status-bar"]')
|
||||
?? document.querySelector('.status-bar');
|
||||
if (!el) return '';
|
||||
return getComputedStyle(el).backgroundColor;
|
||||
});
|
||||
if (bg) {
|
||||
expect(bg.length).toBeGreaterThan(0);
|
||||
}
|
||||
});
|
||||
|
||||
it('should show agent running/idle/stalled counts', async () => {
|
||||
const text = await browser.execute(() => {
|
||||
const el = document.querySelector('[data-testid="status-bar"]')
|
||||
?? document.querySelector('.status-bar');
|
||||
return el?.textContent ?? '';
|
||||
});
|
||||
expect(typeof text).toBe('string');
|
||||
});
|
||||
|
||||
it('should show attention queue cards on click', async () => {
|
||||
const dropdown = await browser.execute(() => {
|
||||
const btn = document.querySelector('.attention-queue');
|
||||
if (btn) (btn as HTMLElement).click();
|
||||
return document.querySelector('.attention-dropdown')
|
||||
?? document.querySelector('.attention-cards');
|
||||
});
|
||||
expect(dropdown !== undefined).toBe(true);
|
||||
// Close by clicking elsewhere
|
||||
await browser.execute(() => document.body.click());
|
||||
await browser.pause(200);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue