Skip to content

Commit be38cb4

Browse files
author
Peter Rushforth
committed
Add timeouts to decrease flakiness
1 parent e208f15 commit be38cb4

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

test/e2e/elements/map-link/map-link-api.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ test.describe('map-link api tests', () => {
8383
);
8484
});
8585
test("map-links that shouldn't have an extent behave accordingly", async () => {
86+
await page.waitForTimeout(500);
8687
// create a layer containing a <map-link rel=license
8788
const viewer = page.getByTestId('viewer');
8889
await viewer.evaluate((map) => {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ test.describe('Playwright map[is=web-map] fullscreen tests', () => {
1818
await page.goto('map-in-shadow-root.html');
1919
});
2020
test('Fullscreen button makes shadow DOM map[is=web-map] element the fullscreen element', async () => {
21+
await page.waitForTimeout(500);
2122
const map1 = page.getByTestId('map1');
2223
const fullscreenButton = map1.getByTitle(/(View)|(Exit) Fullscreen/i);
2324
await fullscreenButton.click();

test/e2e/layers/mixedLayer-zindex-rendering.test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ test.describe('Mixed Layer Z-Index Rendering Tests', () => {
1313
});
1414

1515
test('baseline rendering - red map-extent over green inline tiles and features', async () => {
16+
await page.waitForTimeout(500);
1617
// Take baseline screenshot showing red tiles on top with blue feature visible
1718
const screenshot = await page.screenshot({ fullPage: false });
1819
expect(screenshot).toMatchSnapshot('mixedLayer-baseline.png');
@@ -38,6 +39,7 @@ test.describe('Mixed Layer Z-Index Rendering Tests', () => {
3839
mapExtents[0].checked = false;
3940
}
4041
});
42+
await page.waitForTimeout(500);
4143

4244
// Take screenshot showing green tiles are now visible
4345
const screenshot = await page.screenshot({ fullPage: false });
@@ -60,6 +62,7 @@ test.describe('Mixed Layer Z-Index Rendering Tests', () => {
6062
mapExtents[1].checked = true;
6163
}
6264
});
65+
await page.waitForTimeout(500);
6366

6467
// Take screenshot showing blue extent covering everything
6568
const screenshot = await page.screenshot({ fullPage: false });
@@ -102,7 +105,7 @@ test.describe('Mixed Layer Z-Index Rendering Tests', () => {
102105
);
103106
}
104107
});
105-
108+
await page.waitForTimeout(500);
106109
// Take screenshot to validate the DOM order change effect
107110
const screenshot = await page.screenshot({ fullPage: false });
108111
expect(screenshot).toMatchSnapshot('mixedLayer-dom-reordered.png');
@@ -123,6 +126,8 @@ test.describe('Mixed Layer Z-Index Rendering Tests', () => {
123126
// At least one feature should exist
124127
expect(featuresCount).toBeGreaterThan(0);
125128

129+
await page.waitForTimeout(500);
130+
126131
// Take screenshot to validate feature visibility and positioning
127132
const screenshot = await page.screenshot({ fullPage: false });
128133
expect(screenshot).toMatchSnapshot('mixedLayer-features-baseline.png');
@@ -151,6 +156,7 @@ test.describe('Mixed Layer Z-Index Rendering Tests', () => {
151156
expect(elementCounts.featureCount).toBeGreaterThan(0);
152157
expect(elementCounts.checkedExtents).toBeGreaterThan(0);
153158

159+
await page.waitForTimeout(500);
154160
// Take a screenshot to validate the final hierarchy
155161
const screenshot = await page.screenshot({ fullPage: false });
156162
expect(screenshot).toMatchSnapshot('mixedLayer-hierarchy-validation.png');

0 commit comments

Comments
 (0)