Skip to content

Commit 19d1e00

Browse files
author
Peter Rushforth
committed
Add timeouts to mitigate flakiness
1 parent 24e125f commit 19d1e00

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

test/e2e/elements/layer-/layer-dash-src.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ test.describe('layer- local/inline vs remote content/src tests', () => {
1919
const labelProperty = await layer.evaluate((l) => l.label);
2020
expect(labelProperty).toEqual('Canada Base Map - Transportation (CBMT)');
2121
await layer.evaluate((layer) => layer.zoomTo());
22+
await page.waitForTimeout(500);
2223
let mapLocation = await viewer.evaluate((v) => ({
2324
lat: v.lat,
2425
lon: v.lon,
@@ -35,6 +36,7 @@ test.describe('layer- local/inline vs remote content/src tests', () => {
3536
// remove the src attribute
3637

3738
await layer.evaluate((layer) => layer.removeAttribute('src'));
39+
await page.waitForTimeout(500);
3840
expect(layer).toHaveAttribute('disabled');
3941

4042
// append the template map-extent to the local / inline content

test/e2e/elements/map-layer/map-layer-media.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ enabled and added to the layer control when mq removed`, async () => {
8585
test(`An invalid media query is the same as a non-matching media query`, async () => {
8686
const noInitialQueryLayer = page.getByTestId('no-initial-mq');
8787
await noInitialQueryLayer.evaluate((l) => l.setAttribute('media', '(foo '));
88+
await page.waitForTimeout(500);
8889
await expect(noInitialQueryLayer).toHaveAttribute('disabled', '');
8990
});
9091
});

test/e2e/elements/map/map-in-shadow-root.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ test.describe('Playwright map[is=web-map] fullscreen tests', () => {
2929
// the first mapml-viewer should be returned by document.fullscreen
3030
expect(fullscreenElement).toEqual('map1');
3131
await fullscreenButton.click();
32+
await page.waitForTimeout(500);
3233
fullscreenElement = await page.evaluate(`document.fullscreenElement`);
3334
expect(fullscreenElement).toBeFalsy();
3435

0 commit comments

Comments
 (0)