Skip to content

Commit

Permalink
Ensure the webgl line&fill pattern rendering tests pass everytime
Browse files Browse the repository at this point in the history
This makes sure that icons are loaded before rendering
  • Loading branch information
jahow committed Dec 11, 2023
1 parent f9d40f5 commit 9d86980
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 7 additions & 4 deletions test/rendering/cases/webgl-fill-pattern/main.js
Expand Up @@ -94,7 +94,7 @@ const vector3 = new WebGLLayer({
}),
});

new Map({
const map = new Map({
layers: [vector1, vector2, vector3],
target: 'map',
view: new View({
Expand All @@ -104,6 +104,9 @@ new Map({
}),
});

render({
message: 'renders four polygons with various pattern fills',
});
setTimeout(() => {
map.renderSync();
render({
message: 'renders four polygons with various pattern fills',
});
}, 50);
11 changes: 7 additions & 4 deletions test/rendering/cases/webgl-line-pattern/main.js
Expand Up @@ -73,7 +73,7 @@ const vector = new WebGLLayer({
}),
});

new Map({
const map = new Map({
layers: [vector],
target: 'map',
view: new View({
Expand All @@ -83,6 +83,9 @@ new Map({
}),
});

render({
message: 'renders lines with various patterns',
});
setTimeout(() => {
map.renderSync();
render({
message: 'renders lines with various patterns',
});
}, 50);

0 comments on commit 9d86980

Please sign in to comment.