Skip to content

Commit

Permalink
fix(test): core breaking changes after refactor TMS/Extent
Browse files Browse the repository at this point in the history
  • Loading branch information
gchoqueux committed Jul 29, 2019
1 parent 1f35627 commit b9f3b77
Show file tree
Hide file tree
Showing 9 changed files with 249 additions and 105 deletions.
108 changes: 108 additions & 0 deletions test/data/geojson/holesPoints.geojson.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
0,
0
],
[
0,
1
],
[
2,
1
],
[
2,
0
]
]
]
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
0.2,
0.3
],
[
0.2,
0.7
],
[
1.4,
0.7
],
[
1.4,
0.3
]
]
]
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
0,
0
],
[
0,
1
],
[
2,
1
],
[
2,
0
]
],
[
[
0.2,
0.3
],
[
0.2,
0.7
],
[
1.4,
0.7
],
[
1.4,
0.3
]
]
]
}
},
{
"type": "Feature",
"geometry": {
"type": "point",
"coordinates": [0.5, 0.5]
}
}
]
}
6 changes: 3 additions & 3 deletions test/functional/globe.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ describe('globe', function _() {
const limit = maxColorSamplerUnitsCount - colorSamplerUnitsCount;

// add layers just below the capacity limit
const underLimit = await page.evaluate(maxLayersCount => itowns.Fetcher.json('./layers/JSONLayers/OrthosCRS.json').then((params) => {
const underLimit = await page.evaluate(maxLayersCount => itowns.Fetcher.json('./layers/JSONLayers/OPENSM.json').then((params) => {
// eslint-disable-next-line no-param-reassign
params.source = new itowns.WMTSSource(params.source);
params.source = new itowns.TMSSource(params.source);
const promises = [];
for (let i = 0; i < maxLayersCount; i++) {
const layer = new itowns.ColorLayer(`${params.id}_${i}`, params);
Expand All @@ -56,7 +56,7 @@ describe('globe', function _() {

// add one layer just over the capacity limit
// verify if the error is handled
const errorOverLimit = await page.evaluate(() => itowns.Fetcher.json('./layers/JSONLayers/OrthosCRS.json').then((params) => {
const errorOverLimit = await page.evaluate(() => itowns.Fetcher.json('./layers/JSONLayers/OPENSM.json').then((params) => {
const layerParams = Object.assign({}, params);
layerParams.id = 'max';
return view.addLayer(layerParams).then(() => false).catch(() => true);
Expand Down
Loading

0 comments on commit b9f3b77

Please sign in to comment.