Open History to see the last commit
1import { expect, test } from '@playwright/test'
2
3// The framework hooks always pass the real devtools bridge factory, so this
4// is the only scenario in the suite that exercises the no-op bridge that
5// vanilla `ChatClient` consumers get by default.
6test.describe('vanilla ChatClient with default no-op devtools bridge', () => {
7 test('first sendMessage appends the user message and streams a reply', async ({
8 page,
9 }) => {
10 await page.goto('/chat-client-default-bridge')
11
12 await page.getByTestId('send-button').click()
13
14 await expect(page.getByTestId('user-message')).toHaveText(
15 'hello from the vanilla client',
16 )
17 await expect(page.getByTestId('assistant-message')).toContainText(
18 'Hi from the assistant',
19 )
20 await expect(page.getByTestId('send-error')).toHaveCount(0)
21 })
22})