Skip to content

Commit

Permalink
Tests - Add E2E tests for warnings display
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Feb 27, 2024
1 parent 2f44ee2 commit befcdc2
Show file tree
Hide file tree
Showing 3 changed files with 1,652 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/end2end/playwright/project_load_warning.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { test, expect } from '@playwright/test';

test.describe('Project warnings in CFG as admin', () => {
test.use({ storageState: 'playwright/.auth/admin.json' });

test('Visit map with a warning', async ({ page }) => {
const url = '/index.php/view/map?repository=testsrepository&project=project_cfg_warnings';
await page.goto(url, { waitUntil: 'networkidle' });

await expect(page.locator("#lizmap-warning-message")).toBeVisible();
});

});

test.describe('Project warnings in CFG as anonymous', () => {

test('Visit map without a warning', async ({ page }) => {
const url = '/index.php/view/map?repository=testsrepository&project=project_cfg_warnings';
await page.goto(url, { waitUntil: 'networkidle' });

await expect(page.locator("#lizmap-warning-message")).toHaveCount(0);
});

});
Loading

0 comments on commit befcdc2

Please sign in to comment.