From 7c2104d37d1cdb60a763de802e54b620cfac8dd8 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Sun, 15 Nov 2026 21:09:58 +0000 Subject: [PATCH] test(ui-react): say why keyboard hints' lazy tree wait has no 1000 ms budget The comment claimed the treeitem wait had expect.poll's 1000 ms budget. expect.element without a timeout gets the test's remaining time in Vitest 4.1, and a tree module held for 5 s by a Playwright route still passed without the awaited import. Keep the import as a stated dependency and correct the reason (#3285). Co-Authored-By: Claude Opus 5.5 --- packages/ui-react/tests/browser/keyboard-hints.pointer.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/ui-react/tests/browser/keyboard-hints.pointer.tsx b/packages/ui-react/tests/browser/keyboard-hints.pointer.tsx index d4f4e21146..3faa15066a 100644 --- a/packages/ui-react/tests/browser/keyboard-hints.pointer.tsx +++ b/packages/ui-react/tests/browser/keyboard-hints.pointer.tsx @@ -90,8 +90,10 @@ for (const width of live ? [1280] : [320, 600, 1280]) { } expect(composerHint.getBoundingClientRect().height > 0 && composerHint.innerText.includes("⏎"), "composer keys").toBe(fine); await expect.poll(() => ui!.stores.ui.getState().filePanelOpen).toBe(true); - // The open panel has started the real lazy tree load (#3285). A cold Vite - // transform must finish before the treeitem poll gets its 1000ms budget. + // The open panel has started the real lazy tree load (#3285). Awaiting it + // states the dependency; the wait below does not need it, because + // `expect.element` without a timeout gets the test's remaining time, not + // `expect.poll`'s 1000 ms. A tree module held for 5 s still passed there. await import("../../src/components/files/file-tree.js"); const tree = page.getByRole("treeitem", { name: /return.md/ }); await expect.element(tree).toBeVisible();