Skip to content

Commit 8584043

Browse files
committed
test(platform-live): steer once the turn is streaming, not as soon as Stop shows
1 parent e40acfb commit 8584043

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/sim/platform/checks/live/chat.spec.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,16 @@ test('A message sent during a running turn steers it', async ({ page }) => {
8282
await field.fill('Count slowly from 1 to 50, one number per line.')
8383
await page.getByRole('button', { name: 'Send message' }).click()
8484
await expect(page.getByRole('button', { name: 'Stop response' })).toBeVisible()
85+
const conversation = page.getByRole('region', { name: 'Conversation' })
86+
// Stop shows before the agent's stream is open, and a steer the agent cannot place yet is held
87+
// for after the response, so this steers once the turn is counting.
88+
await expect(conversation.getByText(/^1\s/)).toBeVisible()
8589
const steered = page.waitForRequest(
8690
(request) => request.method() === 'POST' && request.url().includes('/api/copilot/chat/steer')
8791
)
8892
await field.fill('And then say done.')
8993
await field.press('Enter')
9094
expect((await steered).postDataJSON().content).toBe('And then say done.')
91-
const conversation = page.getByRole('region', { name: 'Conversation' })
9295
await expect(conversation.getByText('And then say done.', { exact: true })).toBeVisible()
9396
await expect(conversation.getByText('Applied: And then say done.')).toBeVisible()
9497
await page.getByRole('button', { name: 'Stop response' }).click()

0 commit comments

Comments
 (0)