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

1 comment on commit befcdc2

@3liz-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest weekly run of end2end "playwright" tests failed with this latest commit on the branch release_3_6 😣

CC @nboisteault and @Gustry, please have a look to the logs. Maybe it's a false positive ?

Visit https://github.com/3liz/lizmap-web-client/actions/runs/8135479551

Please sign in to comment.