From 9061c91c89b45b517a77b59ba22687080626f1f2 Mon Sep 17 00:00:00 2001 From: chihlasm Date: Fri, 27 Mar 2026 17:02:19 +0000 Subject: [PATCH] fix: align CI tests with current UI text and database naming MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backend conftest.py was hardcoded to patherly_test but CI creates resolutionflow_test — now reads DATABASE_URL env var first. E2E tests had stale placeholder text, heading, and landing page assertions. Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/tests/conftest.py | 7 +++++-- frontend/e2e/command-palette.spec.ts | 10 +++++----- frontend/e2e/history.spec.ts | 2 +- frontend/e2e/navigation.spec.ts | 2 +- frontend/e2e/public.spec.ts | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/backend/tests/conftest.py b/backend/tests/conftest.py index c3fe7a05..21d9dd0f 100644 --- a/backend/tests/conftest.py +++ b/backend/tests/conftest.py @@ -24,8 +24,11 @@ settings.REQUIRE_INVITE_CODE = False # otherwise fall back to localhost for local development. import os TEST_DATABASE_URL = os.environ.get( - "DATABASE_TEST_URL", - "postgresql+asyncpg://postgres:postgres@localhost:5432/patherly_test", + "DATABASE_URL", + os.environ.get( + "DATABASE_TEST_URL", + "postgresql+asyncpg://postgres:postgres@localhost:5432/patherly_test", + ), ) diff --git a/frontend/e2e/command-palette.spec.ts b/frontend/e2e/command-palette.spec.ts index f059b984..f54184a1 100644 --- a/frontend/e2e/command-palette.spec.ts +++ b/frontend/e2e/command-palette.spec.ts @@ -15,7 +15,7 @@ test.describe('command palette smoke tests', () => { await page.keyboard.press('Control+k') // Should show the palette modal with search input - await expect(page.getByPlaceholder('Search flows, ask a question, navigate')).toBeVisible({ timeout: 3000 }) + await expect(page.getByPlaceholder('Search flows, sessions, tags... or describe an issue to troubleshoot')).toBeVisible({ timeout: 3000 }) // Empty state should show quick actions — the palette label renders uppercase via CSS // Use the palette container to scope the check @@ -24,7 +24,7 @@ test.describe('command palette smoke tests', () => { // Close with Escape await page.keyboard.press('Escape') - await expect(page.getByPlaceholder('Search flows, ask a question, navigate')).not.toBeVisible() + await expect(page.getByPlaceholder('Search flows, sessions, tags... or describe an issue to troubleshoot')).not.toBeVisible() }) test('searches and shows AI Assistant option', async ({ page }) => { @@ -39,7 +39,7 @@ test.describe('command palette smoke tests', () => { await page.keyboard.press('Control+k') - const input = page.getByPlaceholder('Search flows, ask a question, navigate') + const input = page.getByPlaceholder('Search flows, sessions, tags... or describe an issue to troubleshoot') await expect(input).toBeVisible() await input.fill('PW Palette Search') @@ -57,7 +57,7 @@ test.describe('command palette smoke tests', () => { await page.keyboard.press('Control+k') - const input = page.getByPlaceholder('Search flows, ask a question, navigate') + const input = page.getByPlaceholder('Search flows, sessions, tags... or describe an issue to troubleshoot') await expect(input).toBeVisible() await input.fill('analytics') @@ -77,7 +77,7 @@ test.describe('command palette smoke tests', () => { await page.keyboard.press('Control+k') - const input = page.getByPlaceholder('Search flows, ask a question, navigate') + const input = page.getByPlaceholder('Search flows, sessions, tags... or describe an issue to troubleshoot') await expect(input).toBeVisible() await input.fill('how do I fix a print spooler issue') diff --git a/frontend/e2e/history.spec.ts b/frontend/e2e/history.spec.ts index fb82ce00..6b696d48 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: 'Session History' }), + page.getByRole('heading', { name: 'Sessions' }), ).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 621fc367..23f24b73 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: 'Session History' }), + page.getByRole('heading', { name: 'Sessions' }), ).toBeVisible() }) diff --git a/frontend/e2e/public.spec.ts b/frontend/e2e/public.spec.ts index 9b045c1b..1bee7d1d 100644 --- a/frontend/e2e/public.spec.ts +++ b/frontend/e2e/public.spec.ts @@ -7,10 +7,10 @@ test.describe('public route smoke tests', () => { await page.goto('/landing') await expect( - page.getByRole('link', { name: 'Get Started Free' }), + page.getByRole('link', { name: 'Start Free' }), ).toBeVisible() await expect( - page.getByText('Stop writing ticket notes.'), + page.getByText('Resolve tickets faster.'), ).toBeVisible() })