Skip to content

Commit c0d3c29

Browse files
test(ui): make locator text polls nonblocking
1 parent d062194 commit c0d3c29

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎ui/src/e2e/new-session-page.test-support.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export const NODE_HOME = "/Users/peter";
4343
export const NODE_PICKED = "/Users/peter/Projects";
4444
export const NODE_UNC = "\\\\server\\share\\repo";
4545
export const EXEC_ONLY_PICKED = "C:\\Users\\peter\\repo";
46-
const LOCATOR_TEXT_READ_TIMEOUT_MS = 500;
4746
const LOCATOR_TEXT_POLL_TIMEOUT_MS = 10_000;
4847

4948
export const captureUiProofEnabled = process.env.OPENCLAW_CAPTURE_UI_PROOF === "1";
@@ -88,7 +87,7 @@ export const SESSION_LIST_DEFAULTS = {
8887
type LocatorTextPoll = ReturnType<typeof expect.poll<Promise<string | null>>>;
8988

9089
export function pollLocatorText(locator: Locator): LocatorTextPoll {
91-
return expect.poll(() => locator.textContent({ timeout: LOCATOR_TEXT_READ_TIMEOUT_MS }), {
90+
return expect.poll(() => locator.evaluateAll(([element]) => element?.textContent ?? null), {
9291
timeout: LOCATOR_TEXT_POLL_TIMEOUT_MS,
9392
});
9493
}

0 commit comments

Comments
 (0)