Open History to see the last commit
1import { test, expect } from './fixtures'
2import {
3 sendMessage,
4 waitForResponse,
5 getLastAssistantMessage,
6 featureUrl,
7} from './helpers'
8import { providersFor } from './test-matrix'
9
10for (const provider of providersFor('reasoning')) {
11 test.describe(`${provider} — reasoning`, () => {
12 test('shows thinking block and final answer', async ({
13 page,
14 testId,
15 aimockPort,
16 }) => {
17 await page.goto(featureUrl(provider, 'reasoning', testId, aimockPort))
18
19 await sendMessage(page, '[reasoning] recommend a guitar for a beginner')
20 await waitForResponse(page)
21
22 const thinkingBlock = page.getByTestId('thinking-block')
23 await expect(thinkingBlock).toBeVisible()
24 const thinking = await thinkingBlock.innerText()
25 expect(thinking).toContain('beginner')
26
27 const response = await getLastAssistantMessage(page)
28 expect(response).toContain('Fender Stratocaster')
29 })
30 })
31}