High priority (new PR #108 features): - Command palette: open/close, search flows, page navigation, FlowPilot handoff - Fallback branches: add in editor, execute in session runner - Session-to-flow: verify button appears on completed session detail Medium priority (existing features without coverage): - Procedural session: intake form, step-through, completion - Tree editor: troubleshooting and procedural editor load/edit/save - FlowPilot chat: page load, new chat creation - Admin panel: dashboard, user management, settings access Also adds API helpers: createProceduralTree(), createProceduralTreeWithFallbacks() Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
35 lines
1.4 KiB
TypeScript
35 lines
1.4 KiB
TypeScript
import { expect, test } from '@playwright/test'
|
|
|
|
test.describe('FlowPilot assistant chat smoke tests', () => {
|
|
test('can open the assistant chat page and see the chat interface', async ({ page }) => {
|
|
await page.goto('/assistant')
|
|
|
|
// Should load the assistant chat page
|
|
await expect(page.getByText(/FlowPilot|Assistant|Chat/i)).toBeVisible({ timeout: 10000 })
|
|
|
|
// Should have an input area for sending messages
|
|
const messageInput = page.getByPlaceholder(/message|ask|type/i)
|
|
await expect(messageInput).toBeVisible()
|
|
})
|
|
|
|
test('can create a new chat session', async ({ page }) => {
|
|
await page.goto('/assistant')
|
|
await expect(page.getByText(/FlowPilot|Assistant|Chat/i)).toBeVisible({ timeout: 10000 })
|
|
|
|
// Look for new chat button
|
|
const newChatButton = page.getByRole('button', { name: /New|Create/i }).first()
|
|
if (await newChatButton.isVisible()) {
|
|
await newChatButton.click()
|
|
|
|
// Should be able to type a message
|
|
const messageInput = page.getByPlaceholder(/message|ask|type/i)
|
|
await expect(messageInput).toBeVisible()
|
|
await messageInput.fill('How do I troubleshoot DNS issues?')
|
|
}
|
|
})
|
|
|
|
// Note: Full AI response tests require ANTHROPIC_API_KEY in the environment.
|
|
// The send-and-receive flow is validated by the command palette prefill test
|
|
// which navigates here with a prefilled message.
|
|
})
|