Skip to content

Commit

Permalink
[fix]UT
Browse files Browse the repository at this point in the history
  • Loading branch information
luoxiao-supermap committed Apr 19, 2024
1 parent a3ce554 commit 8778e2b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/mapboxgl/overlay/GraphMapSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('GraphMap mapboxgl', () => {
return Promise.resolve(new Response(graphmapData));
}
if (testUrl.includes('/shortestPath.json')) {
expect(testUrl).toBe(knowledgegraphURL + '/shortestPath.json?startid=38756&endid=38757');
expect(testUrl).toBe(knowledgegraphURL + '/shortestPath.json?startID=38756&endID=38757');
expect(options).not.toBeNull();
return Promise.resolve(new Response(findShortestPathData));
}
Expand All @@ -64,7 +64,7 @@ describe('GraphMap mapboxgl', () => {
expect(graphMap).not.toBeNull();
spyOn(graphMap.graph, 'highlight');
spyOn(graphMap.graph, 'clearHighlight');
graphMap.findShortestPath({ startid: 38756, endid: 38757 }, (res) => {
graphMap.findShortestPath({ startID: 38756, endID: 38757 }, (res) => {
expect(res).not.toBeNull();
expect(res.type).toBe('processCompleted');
expect(res.result).not.toBeNull();
Expand Down
1 change: 1 addition & 0 deletions test/maplibregl/overlay/GraphMapSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ describe('GraphMap maplibregl', () => {
expect(res.result).not.toBeNull();
expect(res.result.nodeIDs).toEqual([40229, 40237, 64058]);
expect(res.result.edgeIDs).toEqual([69575, 66619]);
graphMap.highlight({ nodeIDs: [40229], edgeIDs: [69575] });
expect(graphMap.graph.highlight).toHaveBeenCalled();
graphMap.clearHighlight({ nodeIDs: [40229], edgeIDs: [69575] });
expect(graphMap.graph.clearHighlight).toHaveBeenCalled();
Expand Down
2 changes: 1 addition & 1 deletion test/openlayers/overlay/GraphMapSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('GraphMap openlayers', () => {
expect(graphMap).not.toBeNull();
spyOn(graphMap.graph, 'highlight');
spyOn(graphMap.graph, 'clearHighlight');
graphMap.findShortestPath({ startid: 38756, endid: 38757 }, (res) => {
graphMap.findShortestPath({ startID: 38756, endID: 38757 }, (res) => {
expect(res).not.toBeNull();
expect(res.type).toBe('processCompleted');
expect(res.result).not.toBeNull();
Expand Down

0 comments on commit 8778e2b

Please sign in to comment.