From 504a1c6f4be69812a9c5fbe9432f23f739895231 Mon Sep 17 00:00:00 2001 From: Yichen Jiang Date: Thu, 20 Aug 2026 18:55:26 +0800 Subject: [PATCH] test(web): null-tolerant textContent length in the perf lane --- apps/web/tests/complex-history.perf.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/tests/complex-history.perf.ts b/apps/web/tests/complex-history.perf.ts index b0b4bcd7ab..7fed5c6c3f 100644 --- a/apps/web/tests/complex-history.perf.ts +++ b/apps/web/tests/complex-history.perf.ts @@ -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)