tcmts.cli.test.browser

CHROME string | undefined
Page type
hydrated (page: Page) => Promise<boolean>
Wait until React has taken over (hydrated or rendered) the page's `#app`, its effects included: before that, clicks do nothing, or nothing the app's (a link `useAppLinks` follows, whose handler an effect adds, loads the next page). React is on the root as soon as it starts, and on what's in it once it has rendered it (not the scripts and styles it puts first, which it leaves to the browser); its effects run after the next frame.
pageText (url: string, selector: string, until: (text: string) => boolean, timeoutMs?: number) => Promise<st…
Open `url` in a fresh headless Chrome and return the text of `selector` once `until` accepts it (or the last text seen when `timeoutMs` runs out).
withPage <R>(url: string, fn: (page: Page) => Promise<R>) => Promise<R>
Open `url` in a fresh headless Chrome, run `fn` against it, then close Chrome.