Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky map/ legend/ aggregates e2e test #1935

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/e2e/Pages/MapComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ class MapComponent extends DashboardPage {

async clickLayerCheckbox({ layerName }: { layerName: string }) {
// Remove Glofas station from the map (in case the mock is for floods)
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');

await this.layerMenuToggle.click();
await this.page.waitForSelector('data-testid=matrix-layer-name');

const getLayerRow = this.page
.getByTestId('matrix-layer-name')
.filter({ hasText: layerName });
Expand Down Expand Up @@ -273,6 +278,7 @@ class MapComponent extends DashboardPage {
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');
await this.page.waitForSelector('.leaflet-interactive');
await this.page.waitForTimeout(200);

// Assert that Aggregates title is visible and does not contain the text 'National View'

Expand Down
Loading