fix: update Playwright test selectors to match actual UI

- Use specific command palette placeholder to avoid ambiguous matches
- Fix 'Quick Actions' scoping (two elements with same text)
- Fix 'Resolved' exact match on session detail page
- Fix tree editor to use getByText instead of getByDisplayValue
- Fix 'Add Step' strict mode by using .first()
- Fix fallback description placeholder text
- Update playwright.config.ts to use port 5433 and resolutionflow DB
- Update FlowPilot chat selectors to match actual page layout

11/17 new tests now passing. Remaining 6 need procedural session
navigation investigation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-16 12:16:31 -04:00
parent e9c24cbbf7
commit 2b5f63c5a8
7 changed files with 30 additions and 51 deletions

View File

@@ -15,14 +15,16 @@ 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/)).toBeVisible({ timeout: 3000 })
await expect(page.getByPlaceholder('Search flows, ask a question, navigate')).toBeVisible({ timeout: 3000 })
// Empty state should show quick actions
await expect(page.getByText('Quick Actions')).toBeVisible()
// Empty state should show quick actions — the palette label renders uppercase via CSS
// Use the palette container to scope the check
const palette = page.locator('.animate-scale-in')
await expect(palette.getByText('Create New Flow')).toBeVisible()
// Close with Escape
await page.keyboard.press('Escape')
await expect(page.getByPlaceholder(/Search flows/)).not.toBeVisible()
await expect(page.getByPlaceholder('Search flows, ask a question, navigate')).not.toBeVisible()
})
test('searches and shows AI Assistant option', async ({ page }) => {
@@ -37,7 +39,7 @@ test.describe('command palette smoke tests', () => {
await page.keyboard.press('Control+k')
const input = page.getByPlaceholder(/Search flows/)
const input = page.getByPlaceholder('Search flows, ask a question, navigate')
await expect(input).toBeVisible()
await input.fill('PW Palette Search')
@@ -55,7 +57,7 @@ test.describe('command palette smoke tests', () => {
await page.keyboard.press('Control+k')
const input = page.getByPlaceholder(/Search flows/)
const input = page.getByPlaceholder('Search flows, ask a question, navigate')
await expect(input).toBeVisible()
await input.fill('analytics')
@@ -74,7 +76,7 @@ test.describe('command palette smoke tests', () => {
await page.keyboard.press('Control+k')
const input = page.getByPlaceholder(/Search flows/)
const input = page.getByPlaceholder('Search flows, ask a question, navigate')
await expect(input).toBeVisible()
await input.fill('how do I fix a print spooler issue')