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:
@@ -7,8 +7,8 @@ test.describe('FlowPilot assistant chat smoke tests', () => {
|
||||
// Should load the assistant chat page — UI shows "AI Assistant" heading
|
||||
await expect(page.getByText('AI Assistant')).toBeVisible({ timeout: 10000 })
|
||||
|
||||
// Should show the start conversation button when no chats exist
|
||||
await expect(page.getByRole('button', { name: /Start a Conversation/i })).toBeVisible()
|
||||
// Should show the start conversation button or new chat button
|
||||
await expect(page.getByText('Start a Conversation')).toBeVisible()
|
||||
})
|
||||
|
||||
test('can create a new chat session', async ({ page }) => {
|
||||
@@ -16,15 +16,9 @@ test.describe('FlowPilot assistant chat smoke tests', () => {
|
||||
await expect(page.getByText('AI Assistant')).toBeVisible({ timeout: 10000 })
|
||||
|
||||
// Click "New Chat" button in the sidebar
|
||||
const newChatButton = page.getByRole('button', { name: /New Chat/i })
|
||||
await expect(newChatButton).toBeVisible()
|
||||
await newChatButton.click()
|
||||
await page.getByText('New Chat').click()
|
||||
|
||||
// After creating a chat, the message input area should appear
|
||||
// The textarea may use various placeholders
|
||||
const messageInput = page.locator('textarea').first()
|
||||
await expect(messageInput).toBeVisible({ timeout: 5000 })
|
||||
// After creating a chat, a textarea or input should appear for messaging
|
||||
await expect(page.locator('textarea').first()).toBeVisible({ timeout: 5000 })
|
||||
})
|
||||
|
||||
// Note: Full AI response tests require ANTHROPIC_API_KEY in the environment.
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user