test(web): wait for the Host to accept each queued prompt before the next
The composer stays editable while a prompt is sending, so waiting for an editable composer no longer waits for the round trip. Consecutive sends in the queue layout and queued image scenarios now wait until the composer clears, which happens only after the Host accepted the previous prompt.
This commit is contained in:
1 parent
eb105d3471
commit
882b9dad5b
2 files changed
+4
-2
No files matched your search
@@ -363,10 +363,11 @@ describe('web e2e: queue row actions', () => {
|
||||
await page.locator('[data-testid="todo-panel"]').waitFor({ timeout: 10_000 })
|
||||
|
||||
for (const text of ['Layout queue first', 'Layout queue second']) {
|
||||
// A just-submitted composer is read-only for the prompt round-trip.
|
||||
await page.locator('[data-composer-input][contenteditable="true"]').first().waitFor({ timeout: 10_000 })
|
||||
await input.fill(text)
|
||||
await input.press('Enter')
|
||||
// The composer keeps a sent message, still editable, until the Host accepts it.
|
||||
await expect.poll(() => input.textContent(), { timeout: 10_000 }).toBe('')
|
||||
}
|
||||
const queueHeader = page.getByRole('button', { name: '2 queued messages' })
|
||||
await expect.poll(() => queueHeader.getAttribute('aria-expanded'), { timeout: 10_000 })
|
||||
|
||||
@@ -96,7 +96,8 @@ describe('web e2e: queued image submission', () => {
|
||||
await input.press('Enter')
|
||||
await expect.poll(() => existsSync(readyFile), { timeout: 15_000 }).toBe(true)
|
||||
|
||||
// A just-submitted composer is read-only for the prompt round-trip.
|
||||
// The composer keeps the sent prompt, still editable, until the Host accepts it.
|
||||
await expect.poll(() => input.textContent(), { timeout: 10_000 }).toBe('')
|
||||
await page.locator('[data-composer-input][contenteditable="true"]').first().waitFor({ timeout: 10_000 })
|
||||
await pasteImage(page, await readFile(PNG))
|
||||
await page.getByRole('img', { name: 'queued.png' }).waitFor({ timeout: 10_000 })
|
||||
|
||||
Reference in new issue
Block a user