stratoflights-web/tests/e2e/map.spec.ts
2026-08-14 00:01:49 +09:00

15 lines
545 B
TypeScript

import { test, expect, type Page } from '@playwright/test';
async function login(page: Page) {
await page.goto('/login/');
await page.fill('#lg-username', 'demo');
await page.fill('#lg-password', 'demo');
await page.click('button[type=submit]');
await expect(page.getByTestId('nav-menu')).toBeVisible();
}
test('the map renders on /app after login', async ({ page }) => {
await login(page);
// MapLibre mounts its WebGL canvas once the style loads.
await expect(page.locator('.maplibregl-canvas')).toBeVisible({ timeout: 20000 });
});