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
|
|
@ -66,7 +66,7 @@ describe('Scenario B1 — Multi-Project Grid', () => {
|
|||
|
||||
it('should show project headers with CWD paths', async () => {
|
||||
const headers = await browser.execute(() => {
|
||||
const els = document.querySelectorAll('.project-header .cwd');
|
||||
const els = document.querySelectorAll('.project-header .info-cwd');
|
||||
return Array.from(els).map((e) => e.textContent?.trim() ?? '');
|
||||
});
|
||||
for (const cwd of headers) {
|
||||
|
|
@ -116,7 +116,7 @@ describe('Scenario B1 — Multi-Project Grid', () => {
|
|||
const ids = await getProjectIds();
|
||||
if (ids.length < 1) return;
|
||||
const titleAttr = await browser.execute((id) => {
|
||||
const el = document.querySelector(`[data-project-id="${id}"] .project-header .cwd`);
|
||||
const el = document.querySelector(`[data-project-id="${id}"] .project-header .info-cwd`);
|
||||
return el?.getAttribute('title') ?? el?.textContent?.trim() ?? '';
|
||||
}, ids[0]);
|
||||
expect(titleAttr.length).toBeGreaterThan(0);
|
||||
|
|
@ -162,9 +162,9 @@ describe('Scenario B2 — Independent Tab Switching', () => {
|
|||
await resetToModelTabs();
|
||||
});
|
||||
|
||||
it('should allow different tabs active in different projects', async () => {
|
||||
it('should allow different tabs active in different projects', async function () {
|
||||
const ids = await getProjectIds();
|
||||
if (ids.length < 2) { console.log('Skipping B2 — need 2+ projects'); return; }
|
||||
if (ids.length < 2) { console.log('Skipping B2 — need 2+ projects'); this.skip(); return; }
|
||||
await switchProjectTab(ids[0], 3); // Files tab
|
||||
await switchProjectTab(ids[1], 0); // Model tab
|
||||
const getActiveTab = (id: string) => browser.execute((pid) => {
|
||||
|
|
@ -176,9 +176,9 @@ describe('Scenario B2 — Independent Tab Switching', () => {
|
|||
await switchProjectTab(ids[0], 0);
|
||||
});
|
||||
|
||||
it('should preserve scroll position when switching between projects', async () => {
|
||||
it('should preserve scroll position when switching between projects', async function () {
|
||||
const ids = await getProjectIds();
|
||||
if (ids.length < 2) return;
|
||||
if (ids.length < 2) { this.skip(); return; }
|
||||
await focusProject(ids[0]);
|
||||
await focusProject(ids[1]);
|
||||
await focusProject(ids[0]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue