test(web): null-tolerant textContent length in the perf lane

This commit is contained in:
Yichen Jiang committed 2026-08-20 18:55:26 +08:00
1 parent 4f808771ce
commit 504a1c6f4b
1 file changed
+2 -2
+2 -2
View File
@@ -948,7 +948,7 @@ async function continueConversation(
const composerFill = await measure(cdp, async () => {
await composer.fill(spec.prompt)
await expect.poll(() => composer.textContent()).toBe(spec.prompt)
return (await composer.textContent()).length
return ((await composer.textContent()) ?? '').length
})
expect(composerFill.value).toBe(spec.prompt.length)
@@ -1068,7 +1068,7 @@ async function measurePostSoakUserRender(
const composerFill = await measure(cdp, async () => {
await composer.fill(spec.prompt)
await expect.poll(() => composer.textContent()).toBe(spec.prompt)
return (await composer.textContent()).length
return ((await composer.textContent()) ?? '').length
})
expect(composerFill.value).toBe(spec.prompt.length)