test(web): await stopped queue state
This commit is contained in:
@@ -260,7 +260,9 @@ describe('web e2e: long Chat interaction contract', () => {
|
|||||||
expect(await composer.inputValue()).toBe('')
|
expect(await composer.inputValue()).toBe('')
|
||||||
expect(await composer.isEnabled()).toBe(true)
|
expect(await composer.isEnabled()).toBe(true)
|
||||||
expect(source.session.events.some(event => carries(event, CONTINUE_PROMPT))).toBe(false)
|
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'> => (
|
const lastTurnEnd = child.session.events.findLast((event): event is SessionEvent<'turn/end'> => (
|
||||||
event.type === 'turn/end'
|
event.type === 'turn/end'
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -159,6 +159,8 @@ describe('web e2e: queue row actions', () => {
|
|||||||
|
|
||||||
await page.getByRole('button', { name: 'Stop generating' }).click()
|
await page.getByRole('button', { name: 'Stop generating' }).click()
|
||||||
await firstSettled
|
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())
|
await expect.poll(() => page.getByRole('button', { name: 'Remove queued message' }).count())
|
||||||
.toBe(2)
|
.toBe(2)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user