From c7abe905f710e917da90620513488df96b791cec Mon Sep 17 00:00:00 2001 From: chihlasm Date: Fri, 27 Mar 2026 17:16:38 +0000 Subject: [PATCH] fix: resolve strict mode violations and stale text in E2E tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - public.spec.ts: add exact:true for 'Start Free' (matched 3 links) - navigation/history: add exact:true for 'Sessions' heading (matched 'AI Sessions' and 'Flow Sessions' subheadings too) - command-palette: 'Ask FlowPilot AI' → 'Troubleshoot with FlowPilot' - CLAUDE.md: add warning not to use gh run watch (burns tokens) Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 2 +- frontend/e2e/command-palette.spec.ts | 4 ++-- frontend/e2e/history.spec.ts | 2 +- frontend/e2e/navigation.spec.ts | 2 +- frontend/e2e/public.spec.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 965f8f29..21a34431 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -221,8 +221,8 @@ cd backend && pip install httpx && python -m scripts.seed_trees # CI/CD debugging gh run list --limit 5 # Recent CI runs gh run view --log-failed # Failed job logs -gh run watch --exit-status # Watch run until complete gh run view --json jobs --jq '.jobs[] | {name: .name, conclusion: .conclusion}' +# NEVER use `gh run watch` — it holds context open and burns tokens while waiting ``` ### URLs diff --git a/frontend/e2e/command-palette.spec.ts b/frontend/e2e/command-palette.spec.ts index f54184a1..c011a1a9 100644 --- a/frontend/e2e/command-palette.spec.ts +++ b/frontend/e2e/command-palette.spec.ts @@ -45,7 +45,7 @@ test.describe('command palette smoke tests', () => { // Should show AI Assistant section with FlowPilot option await expect(page.getByText('AI Assistant')).toBeVisible({ timeout: 5000 }) - await expect(page.getByText('Ask FlowPilot AI')).toBeVisible() + await expect(page.getByText('Troubleshoot with FlowPilot')).toBeVisible() } finally { await disposeApiContext(api) } @@ -83,7 +83,7 @@ test.describe('command palette smoke tests', () => { // AI Assistant section should appear with FlowPilot option await expect(page.getByText('AI Assistant')).toBeVisible({ timeout: 3000 }) - const flowpilotOption = page.getByText('Ask FlowPilot AI') + const flowpilotOption = page.getByText('Troubleshoot with FlowPilot') await expect(flowpilotOption).toBeVisible() await flowpilotOption.click() diff --git a/frontend/e2e/history.spec.ts b/frontend/e2e/history.spec.ts index 6b696d48..feb14379 100644 --- a/frontend/e2e/history.spec.ts +++ b/frontend/e2e/history.spec.ts @@ -24,7 +24,7 @@ test.describe('session history smoke tests', () => { await page.goto('/sessions') await expect( - page.getByRole('heading', { name: 'Sessions' }), + page.getByRole('heading', { name: 'Sessions', exact: true }), ).toBeVisible() await page.getByPlaceholder('Search by ticket number...').fill(ticketNumber) diff --git a/frontend/e2e/navigation.spec.ts b/frontend/e2e/navigation.spec.ts index 23f24b73..2cfa3141 100644 --- a/frontend/e2e/navigation.spec.ts +++ b/frontend/e2e/navigation.spec.ts @@ -14,7 +14,7 @@ test.describe('authenticated navigation smoke tests', () => { await page.goto('/sessions') await expect( - page.getByRole('heading', { name: 'Sessions' }), + page.getByRole('heading', { name: 'Sessions', exact: true }), ).toBeVisible() }) diff --git a/frontend/e2e/public.spec.ts b/frontend/e2e/public.spec.ts index 1bee7d1d..81fd469e 100644 --- a/frontend/e2e/public.spec.ts +++ b/frontend/e2e/public.spec.ts @@ -7,7 +7,7 @@ test.describe('public route smoke tests', () => { await page.goto('/landing') await expect( - page.getByRole('link', { name: 'Start Free' }), + page.getByRole('link', { name: 'Start Free', exact: true }), ).toBeVisible() await expect( page.getByText('Resolve tickets faster.'),