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
|
|
@ -3,7 +3,7 @@ import { browser, expect } from '@wdio/globals';
|
|||
// Phase A — Structure: App structural integrity + settings panel + NEW structural tests.
|
||||
// Shares a single Tauri app session with other phase-a-* spec files.
|
||||
|
||||
// ─── Scenario 1: App renders with project grid and data-testid anchors ───
|
||||
// --- Scenario 1: App renders with project grid and data-testid anchors ---
|
||||
|
||||
describe('Scenario 1 — App Structural Integrity', () => {
|
||||
it('should render the status bar with data-testid', async () => {
|
||||
|
|
@ -40,7 +40,7 @@ describe('Scenario 1 — App Structural Integrity', () => {
|
|||
await expect(session).toBeDisplayed();
|
||||
});
|
||||
|
||||
// ─── NEW structural tests ────────────────────────────────────────────
|
||||
// --- NEW structural tests ---
|
||||
|
||||
it('should render sidebar gear icon for settings', async () => {
|
||||
const btn = await browser.$('[data-testid="settings-btn"]');
|
||||
|
|
@ -112,7 +112,7 @@ describe('Scenario 1 — App Structural Integrity', () => {
|
|||
});
|
||||
});
|
||||
|
||||
// ─── Scenario 2: Settings panel via data-testid ──────────────────────
|
||||
// --- Scenario 2: Settings panel via data-testid ---
|
||||
|
||||
describe('Scenario 2 — Settings Panel (data-testid)', () => {
|
||||
before(async () => {
|
||||
|
|
@ -120,7 +120,8 @@ describe('Scenario 2 — Settings Panel (data-testid)', () => {
|
|||
await browser.execute(() => {
|
||||
const panel = document.querySelector('.sidebar-panel');
|
||||
if (panel && (panel as HTMLElement).offsetParent !== null) {
|
||||
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape' }));
|
||||
const btn = document.querySelector('.panel-close');
|
||||
if (btn) (btn as HTMLElement).click();
|
||||
}
|
||||
});
|
||||
await browser.pause(300);
|
||||
|
|
@ -135,13 +136,13 @@ describe('Scenario 2 — Settings Panel (data-testid)', () => {
|
|||
|
||||
const panel = await browser.$('.sidebar-panel');
|
||||
await panel.waitForDisplayed({ timeout: 5000 });
|
||||
// Wait for settings content to mount
|
||||
// Wait for settings panel content to mount
|
||||
await browser.waitUntil(
|
||||
async () => {
|
||||
const count = await browser.execute(() =>
|
||||
document.querySelectorAll('.settings-tab .settings-section').length,
|
||||
const has = await browser.execute(() =>
|
||||
document.querySelector('.settings-panel .settings-content') !== null,
|
||||
);
|
||||
return (count as number) >= 1;
|
||||
return has as boolean;
|
||||
},
|
||||
{ timeout: 5000 },
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue