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:
parent
6459877c89
commit
1b838eb9fc
8 changed files with 233 additions and 206 deletions
|
|
@ -1,18 +1,18 @@
|
|||
import { browser, expect } from '@wdio/globals';
|
||||
|
||||
describe('BTerminal — Smoke Tests', () => {
|
||||
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()) === 'BTerminal',
|
||||
async () => (await browser.getTitle()) === 'Agent Orchestrator',
|
||||
{ timeout: 10_000, timeoutMsg: 'App did not load within 10s' },
|
||||
);
|
||||
const title = await browser.getTitle();
|
||||
expect(title).toBe('BTerminal');
|
||||
expect(title).toBe('Agent Orchestrator');
|
||||
});
|
||||
|
||||
it('should display the status bar', async () => {
|
||||
const statusBar = await browser.$('.status-bar');
|
||||
const statusBar = await browser.$('[data-testid="status-bar"]');
|
||||
await expect(statusBar).toBeDisplayed();
|
||||
});
|
||||
|
||||
|
|
@ -20,11 +20,11 @@ describe('BTerminal — Smoke Tests', () => {
|
|||
const version = await browser.$('.status-bar .version');
|
||||
await expect(version).toBeDisplayed();
|
||||
const text = await version.getText();
|
||||
expect(text).toContain('BTerminal');
|
||||
expect(text).toContain('Agent Orchestrator');
|
||||
});
|
||||
|
||||
it('should display the sidebar rail', async () => {
|
||||
const sidebarRail = await browser.$('.sidebar-rail');
|
||||
const sidebarRail = await browser.$('[data-testid="sidebar-rail"]');
|
||||
await expect(sidebarRail).toBeDisplayed();
|
||||
});
|
||||
|
||||
|
|
@ -34,14 +34,22 @@ describe('BTerminal — Smoke Tests', () => {
|
|||
});
|
||||
|
||||
it('should toggle sidebar with settings button', async () => {
|
||||
const settingsBtn = await browser.$('.rail-btn');
|
||||
await settingsBtn.click();
|
||||
// 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 again to close
|
||||
await settingsBtn.click();
|
||||
// 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();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue