test(web): harden live thinking tail observation
This commit is contained in:
@@ -159,7 +159,8 @@ describe('web e2e: lifecycle & chrome (workspace flow / reload / dark mode)', ()
|
|||||||
const settled = scaffold.whenTurnSettled()
|
const settled = scaffold.whenTurnSettled()
|
||||||
await input.fill(PROMPT)
|
await input.fill(PROMPT)
|
||||||
const observeTurn = async () => {
|
const observeTurn = async () => {
|
||||||
if (MODE !== 'record') await page.setViewportSize({ width: 640, height: 1000 })
|
const originalViewport = page.viewportSize() ?? { width: 1680, height: 1000 }
|
||||||
|
if (MODE !== 'record') await page.setViewportSize({ width: 480, height: 1000 })
|
||||||
try {
|
try {
|
||||||
await input.press('Enter')
|
await input.press('Enter')
|
||||||
if (MODE !== 'record') {
|
if (MODE !== 'record') {
|
||||||
@@ -167,11 +168,11 @@ describe('web e2e: lifecycle & chrome (workspace flow / reload / dark mode)', ()
|
|||||||
await expect.poll(async () => await liveTail.evaluate(element => (
|
await expect.poll(async () => await liveTail.evaluate(element => (
|
||||||
element.scrollWidth > element.clientWidth
|
element.scrollWidth > element.clientWidth
|
||||||
&& element.scrollLeft >= element.scrollWidth - element.clientWidth - 1
|
&& element.scrollLeft >= element.scrollWidth - element.clientWidth - 1
|
||||||
)), { timeout: 10_000 }).toBe(true)
|
)), { timeout: 10_000, interval: 10 }).toBe(true)
|
||||||
}
|
}
|
||||||
return await settled
|
return await settled
|
||||||
} finally {
|
} finally {
|
||||||
if (MODE !== 'record') await page.setViewportSize({ width: 1680, height: 1000 })
|
if (MODE !== 'record') await page.setViewportSize(originalViewport)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const sessionId = await observeTurn()
|
const sessionId = await observeTurn()
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
// Enter / Space, icon→chevron hover preview). The collapsed row is always
|
// Enter / Space, icon→chevron hover preview). The collapsed row is always
|
||||||
// one line; every row with body, output, or a card material (terminal, diff,
|
// one line; every row with body, output, or a card material (terminal, diff,
|
||||||
// read, search, web) is expandable; the summary stays inline while open,
|
// read, search, web) is expandable; the summary stays inline while open,
|
||||||
// except Think, whose body opens with the same first line and would repeat it.
|
// except Think, where the running collapsed row follows the latest line at its
|
||||||
|
// scroll end and the summary yields while open to avoid repeating the body.
|
||||||
// The expanded body — an IN/OUT gutter-labeled card (figma 1249:35657) for
|
// The expanded body — an IN/OUT gutter-labeled card (figma 1249:35657) for
|
||||||
// text input/output, the run_code program through CodeBlock, or a card
|
// text input/output, the run_code program through CodeBlock, or a card
|
||||||
// primitive (TerminalBlock, DiffBlock, ReadBlock, SearchBlock, WebBlock) for a
|
// primitive (TerminalBlock, DiffBlock, ReadBlock, SearchBlock, WebBlock) for a
|
||||||
|
|||||||
Reference in New Issue
Block a user