waitForHydrate() — astro Function Reference
Architecture documentation for the waitForHydrate() function in test-utils.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD c373140e_7fdf_7fff_8884_991b85bc22b5["waitForHydrate()"] 2ca394f6_a63d_3921_1f12_c5a979ea0039["test-utils.js"] c373140e_7fdf_7fff_8884_991b85bc22b5 -->|defined in| 2ca394f6_a63d_3921_1f12_c5a979ea0039 7ce5058c_7bda_dfaa_d85a_e1df327dc642["testClientDirectivesShared()"] 7ce5058c_7bda_dfaa_d85a_e1df327dc642 -->|calls| c373140e_7fdf_7fff_8884_991b85bc22b5 4471adac_6b72_7031_4587_e50c8db5a233["prepareTestFactory()"] 4471adac_6b72_7031_4587_e50c8db5a233 -->|calls| c373140e_7fdf_7fff_8884_991b85bc22b5 38da1fdb_69a8_1454_f3c6_91ff201e477f["runTest()"] 38da1fdb_69a8_1454_f3c6_91ff201e477f -->|calls| c373140e_7fdf_7fff_8884_991b85bc22b5 style c373140e_7fdf_7fff_8884_991b85bc22b5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/e2e/test-utils.js lines 93–100
export async function waitForHydrate(page, el) {
const astroIsland = page.locator('astro-island', { has: el });
const astroIslandId = await astroIsland.last().getAttribute('uid');
await page.waitForFunction(
(selector) => document.querySelector(selector)?.hasAttribute('ssr') === false,
`astro-island[uid="${astroIslandId}"]`,
);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does waitForHydrate() do?
waitForHydrate() is a function in the astro codebase, defined in packages/astro/e2e/test-utils.js.
Where is waitForHydrate() defined?
waitForHydrate() is defined in packages/astro/e2e/test-utils.js at line 93.
What calls waitForHydrate()?
waitForHydrate() is called by 3 function(s): prepareTestFactory, runTest, testClientDirectivesShared.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free