Skip to content

Commit

Permalink
【ut】fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongjiaojiao committed Sep 29, 2024
1 parent 91a90dc commit be9ac41
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions test/unit/mocks/mapboxgl_iclient_webmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,20 @@ class WebMap extends Evented {
}
}
_initWebMap() {
this._createMap('WebMap2');
this._createMap({
layers: [
{
visible: true,
children: [],
id: '民航数据',
title: '民航数据',
renderSource: { type: 'geojson' },
renderLayers: ['民航数据'],
dataSource: { type: 'STRUCTURE_DATA' },
type: 'line'
}
]
});
}

_getMapInfo(mapInfo) {
Expand Down Expand Up @@ -248,7 +261,20 @@ class WebMap extends Evented {
}
});
});
this.fire('layerupdatechanged');
this.fire('layerupdatechanged', {
relevantLayers: [
{
visible: true,
children: [],
id: '民航数据',
title: '民航数据',
renderSource: { type: 'geojson' },
renderLayers: ['民航数据'],
dataSource: { type: 'STRUCTURE_DATA' },
type: 'line'
}
]
});
}

copyLayer() {}
Expand Down

0 comments on commit be9ac41

Please sign in to comment.