MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / hydrated

Function hydrated

e2e/src/surfaces/browser.ts:90–102  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

88const HYDRATION_TIMEOUT_MS = 10_000;
89
90export const hydrated = async (page: Page): Promise<void> => {
91 await page
92 .waitForFunction(
93 () =>
94 [...document.body.children].some((element) =>
95 Object.keys(element).some((key) => key.startsWith("__reactContainer$")),
96 ),
97 undefined,
98 { timeout: HYDRATION_TIMEOUT_MS },
99 )
100 // oxlint-disable-next-line executor/no-promise-catch -- boundary: a page with no React root is a legitimate destination
101 .catch(() => {});
102};
103
104/**
105 * Navigate, then wait for the page to be interactive. The drop-in for a `goto`

Callers 2

visitFunction · 0.85
revisitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected