Skip to content

Commit 5f72102

Browse files
committed
test(e2e): fix and stabilize tests
1 parent 560a88d commit 5f72102

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

src/demos/MultiPoint.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@
1919
<ol-source-vector>
2020
<ol-feature>
2121
<ol-geom-multi-point
22-
:coordinates="[[116.547539, 40.450996]]"
22+
:coordinates="[
23+
[116.547539, 40.450996],
24+
[116.544639, 40.451996],
25+
[116.546739, 40.451996],
26+
[116.546739, 40.448996],
27+
]"
2328
></ol-geom-multi-point>
2429
<ol-style>
2530
<ol-style-circle :radius="radius">

tests/MapPage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ export class MapPage {
2424
}
2525

2626
async waitUntilReady(...selectors: string[]) {
27-
await this.page.waitForLoadState();
27+
await this.page.waitForLoadState("domcontentloaded");
2828
await this.page.waitForSelector("canvas");
2929
for (let index = 0; index < selectors.length; index++) {
3030
await this.page.waitForSelector(selectors[index]);
3131
}
3232
}
3333

3434
async waitUntilCanvasLoaded() {
35-
await this.page.waitForLoadState("networkidle");
35+
await this.page.waitForLoadState("networkidle", { timeout: 3000 });
3636
}
3737

3838
async waitMs(timeout: number) {
Loading

tests/layers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ test.describe("ol-tile-layer", () => {
4747
const map = new MapPage(page);
4848
await map.goto("/componentsguide/layers/tilelayer/");
4949
await map.waitUntilReady();
50-
await map.waitUntilCanvasLoaded();
50+
await map.waitMs(5000);
5151
await map.checkCanvasScreenshot();
5252
});
5353
});

tests/sources.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ test.describe("ol-source-wmts", () => {
170170
const map = new MapPage(page);
171171
await map.goto("/componentsguide/sources/wmts/");
172172
await map.waitUntilReady();
173-
await map.waitUntilCanvasLoaded();
173+
await map.waitMs(5000);
174174
await map.checkCanvasScreenshot();
175175
});
176176
});

0 commit comments

Comments
 (0)