mirror of
https://github.com/nicotsx/zerobyte.git
synced 2026-04-18 13:57:52 -04:00
11 lines
365 B
TypeScript
11 lines
365 B
TypeScript
import type { Page } from "@playwright/test";
|
|
|
|
export const waitForAppReady = async (page: Page) => {
|
|
await page.waitForFunction(() => document.body?.getAttribute("data-app-ready") === "true");
|
|
};
|
|
|
|
export const gotoAndWaitForAppReady = async (page: Page, url: string) => {
|
|
await page.goto(url, { waitUntil: "domcontentloaded" });
|
|
await waitForAppReady(page);
|
|
};
|