AFFiNE/tests/libs/load-page.ts

14 lines
331 B
TypeScript
Raw Normal View History

2022-11-28 16:17:34 +03:00
import { test } from '@playwright/test';
2023-01-03 16:57:33 +03:00
import type { Page } from '@playwright/test';
2022-11-28 16:17:34 +03:00
2023-01-03 16:57:33 +03:00
interface IType {
page: Page;
}
2022-11-28 16:17:34 +03:00
export function loadPage() {
2023-01-03 16:57:33 +03:00
test.beforeEach(async ({ page }: IType) => {
await page.goto('http://localhost:8080');
2022-11-28 16:17:34 +03:00
// waiting for page loading end
2023-01-04 11:13:40 +03:00
await page.waitForSelector('#__next');
2022-11-28 16:17:34 +03:00
});
}