File tree Expand file tree Collapse file tree
apps/sim/platform/checks/live Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( )
You can’t perform that action at this time.
0 commit comments