31 lines
1 KiB
TypeScript
31 lines
1 KiB
TypeScript
import { test, expect, login } from './fixtures';
|
|
|
|
test.beforeEach(async ({ context }) => {
|
|
await login(context);
|
|
});
|
|
|
|
test('predict page loads and mounts the MapLibre canvas', async ({ page }) => {
|
|
await page.goto('/predict');
|
|
await expect(page.locator('.map-container canvas').first()).toBeAttached({
|
|
timeout: 15_000,
|
|
});
|
|
});
|
|
|
|
test('left and right panels are visible on predict', async ({ page }) => {
|
|
await page.goto('/predict');
|
|
await expect(page.locator('.panel-container-left')).toBeVisible();
|
|
await expect(page.locator('.panel-container-right')).toBeVisible();
|
|
});
|
|
|
|
test('navbar shows current username dropdown when authenticated', async ({ page }) => {
|
|
await page.goto('/predict');
|
|
await expect(page.getByRole('link', { name: /Прогноз|Predict/ }).first()).toBeVisible();
|
|
await expect(page.getByText('demo').first()).toBeVisible();
|
|
});
|
|
|
|
test('tracking page mounts its own map', async ({ page }) => {
|
|
await page.goto('/track');
|
|
await expect(page.locator('.map-container canvas').first()).toBeAttached({
|
|
timeout: 15_000,
|
|
});
|
|
});
|