(
page: Page,
url: string,
options: { readonly timeout?: number } = {},
)
| 109 | * the navigation itself, exactly as `goto`'s does. |
| 110 | */ |
| 111 | export const visit = async ( |
| 112 | page: Page, |
| 113 | url: string, |
| 114 | options: { readonly timeout?: number } = {}, |
| 115 | ): Promise<Response | null> => { |
| 116 | const response = await page.goto(url, { waitUntil: "load", ...options }); |
| 117 | await hydrated(page); |
| 118 | await settle(page); |
| 119 | return response; |
| 120 | }; |
| 121 | |
| 122 | /** `visit` for a reload — the drop-in for `reload({ waitUntil: "networkidle" })`. */ |
| 123 | export const revisit = async ( |