mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-22 04:21:56 +03:00
7a201984e9
fix AF-1432, PD-1176
24 lines
580 B
TypeScript
24 lines
580 B
TypeScript
import type { Page } from '@playwright/test';
|
|
import { expect } from '@playwright/test';
|
|
|
|
export let coreUrl = 'http://localhost:8080';
|
|
|
|
export function setCoreUrl(url: string) {
|
|
coreUrl = url;
|
|
}
|
|
|
|
export async function openHomePage(page: Page) {
|
|
await page.goto(coreUrl);
|
|
}
|
|
|
|
export async function open404Page(page: Page) {
|
|
await page.goto(`${coreUrl}/404`);
|
|
}
|
|
|
|
export async function openJournalsPage(page: Page) {
|
|
await page.getByTestId('slider-bar-journals-button').click();
|
|
await expect(
|
|
page.locator('.doc-title-container:has-text("Today")')
|
|
).toBeVisible();
|
|
}
|