test(web): await stopped queue state

This commit is contained in:
_Kerman
2026-08-04 15:09:55 +08:00
parent d238a865b9
commit a04037479b
2 changed files with 5 additions and 1 deletions

View File

@@ -260,7 +260,9 @@ describe('web e2e: long Chat interaction contract', () => {
expect(await composer.inputValue()).toBe('')
expect(await composer.isEnabled()).toBe(true)
expect(source.session.events.some(event => carries(event, CONTINUE_PROMPT))).toBe(false)
expect(child.session.events.filter(event => carries(event, CONTINUE_PROMPT))).toHaveLength(1)
expect(child.session.events.filter(event => (
event.type === 'user/message' && carries(event, CONTINUE_PROMPT)
))).toHaveLength(1)
const lastTurnEnd = child.session.events.findLast((event): event is SessionEvent<'turn/end'> => (
event.type === 'turn/end'
))

View File

@@ -159,6 +159,8 @@ describe('web e2e: queue row actions', () => {
await page.getByRole('button', { name: 'Stop generating' }).click()
await firstSettled
await expect.poll(() => page.getByRole('button', { name: 'Stop generating' }).count())
.toBe(0)
await expect.poll(() => page.getByRole('button', { name: 'Remove queued message' }).count())
.toBe(2)