@geospatial-sdk/legend 0.0.5-dev.49 → 0.0.5-dev.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,9 @@ import { WmtsEndpoint } from "@camptocamp/ogc-client";
|
|
|
4
4
|
|
|
5
5
|
// Mock dependencies
|
|
6
6
|
vi.mock("@camptocamp/ogc-client", () => ({
|
|
7
|
-
WmtsEndpoint:
|
|
7
|
+
WmtsEndpoint: class WmtsMock {
|
|
8
|
+
isReady() {}
|
|
9
|
+
},
|
|
8
10
|
}));
|
|
9
11
|
|
|
10
12
|
describe("createLegendFromLayer", () => {
|
|
@@ -60,12 +62,12 @@ describe("createLegendFromLayer", () => {
|
|
|
60
62
|
getLayerByName: () => ({
|
|
61
63
|
styles: [{ legendUrl: mockLegendUrl }],
|
|
62
64
|
}),
|
|
63
|
-
};
|
|
65
|
+
} as unknown as WmtsEndpoint;
|
|
64
66
|
|
|
65
67
|
// Mock WmtsEndpoint
|
|
66
|
-
(WmtsEndpoint
|
|
67
|
-
|
|
68
|
-
})
|
|
68
|
+
vi.spyOn(WmtsEndpoint.prototype, "isReady").mockImplementation(function () {
|
|
69
|
+
return Promise.resolve(mockIsReady);
|
|
70
|
+
});
|
|
69
71
|
|
|
70
72
|
const result = await createLegendFromLayer(baseWmtsLayer);
|
|
71
73
|
|
|
@@ -79,12 +81,12 @@ describe("createLegendFromLayer", () => {
|
|
|
79
81
|
getLayerByName: () => ({
|
|
80
82
|
styles: [],
|
|
81
83
|
}),
|
|
82
|
-
};
|
|
84
|
+
} as unknown as WmtsEndpoint;
|
|
83
85
|
|
|
84
86
|
// Mock WmtsEndpoint
|
|
85
|
-
(WmtsEndpoint
|
|
86
|
-
|
|
87
|
-
})
|
|
87
|
+
vi.spyOn(WmtsEndpoint.prototype, "isReady").mockImplementation(function () {
|
|
88
|
+
return Promise.resolve(mockIsReady);
|
|
89
|
+
});
|
|
88
90
|
|
|
89
91
|
const result = await createLegendFromLayer(baseWmtsLayer);
|
|
90
92
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geospatial-sdk/legend",
|
|
3
|
-
"version": "0.0.5-dev.
|
|
3
|
+
"version": "0.0.5-dev.51+33b8820",
|
|
4
4
|
"description": "Get legend graphic from the map-context",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend"
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"build": "tsc"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@geospatial-sdk/core": "^0.0.5-dev.
|
|
33
|
+
"@geospatial-sdk/core": "^0.0.5-dev.51+33b8820"
|
|
34
34
|
},
|
|
35
35
|
"bugs": {
|
|
36
36
|
"url": "https://github.com/camptocamp/geospatial-sdk/issues"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "33b882078fc7b6f4f12d3eaac671d9c142ecf9f7"
|
|
39
39
|
}
|