Initial
This commit is contained in:
commit
b43955e0d9
162 changed files with 15425 additions and 0 deletions
26
tests/e2e/wind.spec.ts
Normal file
26
tests/e2e/wind.spec.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
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 wind layer toggles on, loads a field, and toggles off', async ({ page }) => {
|
||||
await login(page);
|
||||
|
||||
// Off by default: no particle canvas, no status line.
|
||||
await expect(page.locator('canvas.wind-particles')).toHaveCount(0);
|
||||
|
||||
await page.getByTestId('tab-wind').click();
|
||||
await page.getByTestId('wind-toggle').check();
|
||||
await expect(page.getByTestId('wind-status')).toContainText(/загружено|loaded/i, {
|
||||
timeout: 15000
|
||||
});
|
||||
await expect(page.locator('canvas.wind-particles')).toHaveCount(1);
|
||||
|
||||
await page.getByTestId('wind-toggle').uncheck();
|
||||
await expect(page.locator('canvas.wind-particles')).toHaveCount(0);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue