- 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
55 lines
1.9 KiB
TypeScript
55 lines
1.9 KiB
TypeScript
import { browser, expect } from '@wdio/globals';
|
|
|
|
describe('Agent Orchestrator — Smoke Tests', () => {
|
|
it('should render the application window', async () => {
|
|
// Wait for the app to fully load before any tests
|
|
await browser.waitUntil(
|
|
async () => (await browser.getTitle()) === 'Agent Orchestrator',
|
|
{ timeout: 10_000, timeoutMsg: 'App did not load within 10s' },
|
|
);
|
|
const title = await browser.getTitle();
|
|
expect(title).toBe('Agent Orchestrator');
|
|
});
|
|
|
|
it('should display the status bar', async () => {
|
|
const statusBar = await browser.$('[data-testid="status-bar"]');
|
|
await expect(statusBar).toBeDisplayed();
|
|
});
|
|
|
|
it('should show version text in status bar', async () => {
|
|
const version = await browser.$('.status-bar .version');
|
|
await expect(version).toBeDisplayed();
|
|
const text = await version.getText();
|
|
expect(text).toContain('Agent Orchestrator');
|
|
});
|
|
|
|
it('should display the sidebar rail', async () => {
|
|
const sidebarRail = await browser.$('[data-testid="sidebar-rail"]');
|
|
await expect(sidebarRail).toBeDisplayed();
|
|
});
|
|
|
|
it('should display the workspace area', async () => {
|
|
const workspace = await browser.$('.workspace');
|
|
await expect(workspace).toBeDisplayed();
|
|
});
|
|
|
|
it('should toggle sidebar with settings button', async () => {
|
|
// Click settings button via data-testid
|
|
await browser.execute(() => {
|
|
const btn = document.querySelector('[data-testid="settings-btn"]');
|
|
if (btn) (btn as HTMLElement).click();
|
|
});
|
|
|
|
const sidebarPanel = await browser.$('.sidebar-panel');
|
|
await sidebarPanel.waitForDisplayed({ timeout: 5000 });
|
|
await expect(sidebarPanel).toBeDisplayed();
|
|
|
|
// Click the close button to close
|
|
await browser.execute(() => {
|
|
const btn = document.querySelector('.panel-close');
|
|
if (btn) (btn as HTMLElement).click();
|
|
});
|
|
await browser.pause(500);
|
|
await expect(sidebarPanel).not.toBeDisplayed();
|
|
});
|
|
});
|