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. })