2024-03-25 06:55:32 +03:00
|
|
|
import type { Page } from '@playwright/test';
|
|
|
|
import { expect } from '@playwright/test';
|
2022-11-28 16:17:34 +03:00
|
|
|
|
2024-11-01 10:05:12 +03:00
|
|
|
export let coreUrl = 'http://localhost:8080';
|
|
|
|
|
|
|
|
export function setCoreUrl(url: string) {
|
|
|
|
coreUrl = url;
|
|
|
|
}
|
2023-04-22 04:44:29 +03:00
|
|
|
|
2023-03-24 01:15:40 +03:00
|
|
|
export async function openHomePage(page: Page) {
|
2023-08-10 08:05:34 +03:00
|
|
|
await page.goto(coreUrl);
|
2022-11-28 16:17:34 +03:00
|
|
|
}
|
2023-08-03 04:48:35 +03:00
|
|
|
|
2023-10-12 08:04:58 +03:00
|
|
|
export async function open404Page(page: Page) {
|
|
|
|
await page.goto(`${coreUrl}/404`);
|
2023-08-03 04:48:35 +03:00
|
|
|
}
|
2024-02-23 10:55:43 +03:00
|
|
|
|
|
|
|
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();
|
|
|
|
}
|