mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
- iD.Context -> iD.coreContext - iD.Graph -> iD.coreGraph - iD.Node -> iD.osmNode - iD.Way -> iD.osmWay - iD.Relation -> iD.osmRelation
22 lines
771 B
JavaScript
22 lines
771 B
JavaScript
describe('iD.svgRelationMemberTags', function() {
|
|
it('includes tags from parent multipolygon relations', function() {
|
|
var graph = iD.coreGraph([
|
|
iD.osmWay({id: 'w'}),
|
|
iD.osmRelation({id: 'r', members: [{id: 'w'}], tags: {type: 'multipolygon'}})
|
|
]);
|
|
|
|
expect(iD.svgRelationMemberTags(graph)(graph.entity('w')))
|
|
.to.eql({type: 'multipolygon'});
|
|
});
|
|
|
|
it('includes tags from parent boundary relations', function() {
|
|
var graph = iD.coreGraph([
|
|
iD.osmWay({id: 'w'}),
|
|
iD.osmRelation({id: 'r', members: [{id: 'w'}], tags: {type: 'boundary'}})
|
|
]);
|
|
|
|
expect(iD.svgRelationMemberTags(graph)(graph.entity('w')))
|
|
.to.eql({type: 'boundary'});
|
|
});
|
|
});
|