Skip to content

Commit

Permalink
Merge pull request #1935 from rodekruis/fix.flaky-aggregates-test
Browse files Browse the repository at this point in the history
Fix flaky map/ legend/ aggregates e2e test
  • Loading branch information
jannisvisser authored Jan 24, 2025
2 parents 1c67ca2 + 8ad07ef commit 5222c09
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 5222c09

Please sign in to comment.