fix(e2e): update selectors for redesigned UI (9 spec files)

- BTerminal → Agent Orchestrator (title, describe blocks, LLM context)
- Settings: .sidebar-panel → .settings-panel .settings-content,
  .dropdown-trigger → .dropdown-btn, .dropdown-option → .dropdown-item
- Settings open: [data-testid=settings-btn] + .panel-close
- Font controls: .size-control → .stepper, .size-btn → stepper button
- Terminal: data-testid selectors for toggle/tab-add
- Agent pane: .cost-bar → .status-strip/.done-bar, context meter conditional
- Project header: .cwd → .info-cwd
- Health: .health-dot → .status-dot
- Multi-project: proper this.skip() when single-project fixture
This commit is contained in:
Hibryda 2026-03-18 04:45:22 +01:00
parent 6459877c89
commit 1b838eb9fc
8 changed files with 233 additions and 206 deletions

View file

@ -1,10 +1,10 @@
import { browser, expect } from '@wdio/globals';
import { isJudgeAvailable, assertWithJudge } from '../infra/llm-judge';
// Phase C — LLM-Judged Tests (C10C11)
// Phase C — LLM-Judged Tests (C10-C11)
// Settings completeness and status bar completeness via LLM judge.
// ─── Scenario C10: LLM-Judged Settings Completeness ──────────────────
// --- Scenario C10: LLM-Judged Settings Completeness ---
describe('Scenario C10 — LLM-Judged Settings Completeness', () => {
it('should have comprehensive settings panel', async function () {
@ -22,14 +22,14 @@ describe('Scenario C10 — LLM-Judged Settings Completeness', () => {
await browser.pause(500);
const settingsContent = await browser.execute(() => {
const panel = document.querySelector('.sidebar-panel, .settings-tab');
const panel = document.querySelector('.sidebar-panel .settings-panel');
return panel?.textContent ?? '';
});
const verdict = await assertWithJudge(
'The settings panel should contain configuration options for: (1) theme/appearance, (2) font settings (UI and terminal), (3) default shell, and optionally (4) provider settings. It should look like a real settings UI, not an error message.',
settingsContent,
{ context: 'BTerminal v3 settings panel with Appearance section (theme dropdown, UI font, terminal font) and Defaults section (shell, CWD). May also have Providers section.' },
{ context: 'Agent Orchestrator v3 settings panel with Appearance category (theme dropdown, UI font, terminal font, cursor settings) and category sidebar (Appearance, Agents, Security, Projects, Orchestration, Advanced).' },
);
expect(verdict.pass).toBe(true);
@ -37,12 +37,15 @@ describe('Scenario C10 — LLM-Judged Settings Completeness', () => {
console.log(`LLM Judge: ${verdict.reasoning} (confidence: ${verdict.confidence})`);
}
await browser.keys('Escape');
await browser.execute(() => {
const btn = document.querySelector('.panel-close');
if (btn) (btn as HTMLElement).click();
});
await browser.pause(300);
});
});
// ─── Scenario C11: LLM-Judged Status Bar ──────────────────────────────
// --- Scenario C11: LLM-Judged Status Bar ---
describe('Scenario C11 — LLM-Judged Status Bar Completeness', () => {
it('should render a comprehensive status bar', async function () {
@ -63,9 +66,9 @@ describe('Scenario C11 — LLM-Judged Status Bar Completeness', () => {
});
const verdict = await assertWithJudge(
'The status bar should display agent fleet information including: agent status counts (idle/running/stalled with numbers), and optionally burn rate ($/hr) and cost tracking. It should look like a real monitoring dashboard status bar.',
'The status bar should display agent fleet information including: project count, and optionally agent status counts (idle/running/stalled with numbers), burn rate ($/hr), and cost tracking. It should look like a real monitoring dashboard status bar.',
`Text: ${statusBarContent}\n\nHTML structure: ${statusBarHtml.substring(0, 2000)}`,
{ context: 'BTerminal Mission Control status bar shows running/idle/stalled agent counts, total $/hr burn rate, attention queue, and total cost.' },
{ context: 'Agent Orchestrator Mission Control status bar shows group name, project count, running/idle/stalled agent counts, total $/hr burn rate, attention queue, and total cost. Version text shows "Agent Orchestrator v3".' },
);
expect(verdict.pass).toBe(true);