import { expect, test } from '@playwright/test' test.describe('FlowPilot assistant chat smoke tests', () => { test('can open the assistant chat page and see the interface', async ({ page }) => { await page.goto('/assistant') // 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() }) test('can create a new chat session', async ({ page }) => { await page.goto('/assistant') 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() // 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 }) }) // Note: Full AI response tests require ANTHROPIC_API_KEY in the environment. })