2023-01-03 16:57:33 +03:00
|
|
|
import type { Page } from '@playwright/test';
|
2022-11-28 16:17:34 +03:00
|
|
|
|
2023-04-13 11:31:28 +03:00
|
|
|
import { getMetas } from './utils';
|
|
|
|
|
2023-03-24 01:15:40 +03:00
|
|
|
export async function openHomePage(page: Page) {
|
|
|
|
await page.goto('http://localhost:8080');
|
|
|
|
await page.waitForSelector('#__next');
|
2022-11-28 16:17:34 +03:00
|
|
|
}
|
2023-04-13 11:31:28 +03:00
|
|
|
|
|
|
|
export async function initHomePageWithPinboard(page: Page) {
|
|
|
|
await openHomePage(page);
|
|
|
|
await page.waitForSelector('[data-testid="sidebar-pinboard-container"]');
|
|
|
|
return (await getMetas(page)).find(m => m.isRootPinboard);
|
|
|
|
}
|