mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 17:14:04 +02:00
@@ -234,6 +234,10 @@ describe('iD.osmWay', function() {
|
||||
expect(iD.Way({tags: { location: 'overground' }}).layer()).to.equal(1);
|
||||
});
|
||||
|
||||
it('returns -1 for covered=yes', function() {
|
||||
expect(iD.Way({tags: { covered: 'yes' }}).layer()).to.equal(-1);
|
||||
});
|
||||
|
||||
it('returns -1 for location=underground', function() {
|
||||
expect(iD.Way({tags: { location: 'underground' }}).layer()).to.equal(-1);
|
||||
});
|
||||
|
||||
@@ -90,8 +90,8 @@ describe('iD.svgLines', function () {
|
||||
iD.osmNode({id: 'b', loc: [1, 1]}),
|
||||
iD.osmNode({id: 'c', loc: [0, 0]}),
|
||||
iD.osmNode({id: 'd', loc: [1, 1]}),
|
||||
iD.osmWay({id: 'lo', tags: {highway: 'residential', tunnel: 'yes'}, nodes: ['a', 'b']}),
|
||||
iD.osmWay({id: 'hi', tags: {highway: 'residential', bridge: 'yes'}, nodes: ['c', 'd']})
|
||||
iD.osmWay({id: 'lo', tags: {highway: 'residential', layer: '0'}, nodes: ['a', 'b']}),
|
||||
iD.osmWay({id: 'hi', tags: {highway: 'residential', layer: '1'}, nodes: ['c', 'd']})
|
||||
]);
|
||||
|
||||
it('stacks higher lines above lower ones in a single render', function () {
|
||||
|
||||
@@ -8,11 +8,12 @@ describe('iD.svgOsm', function () {
|
||||
it('creates default osm layers', function () {
|
||||
container.call(iD.svgOsm());
|
||||
var layers = container.selectAll('g.layer-osm').nodes();
|
||||
expect(layers.length).to.eql(4);
|
||||
expect(d3.select(layers[0]).classed('layer-areas')).to.be.true;
|
||||
expect(d3.select(layers[1]).classed('layer-lines')).to.be.true;
|
||||
expect(d3.select(layers[2]).classed('layer-points')).to.be.true;
|
||||
expect(d3.select(layers[3]).classed('layer-labels')).to.be.true;
|
||||
expect(layers.length).to.eql(5);
|
||||
expect(d3.select(layers[0]).classed('layer-covered')).to.be.true;
|
||||
expect(d3.select(layers[1]).classed('layer-areas')).to.be.true;
|
||||
expect(d3.select(layers[2]).classed('layer-lines')).to.be.true;
|
||||
expect(d3.select(layers[3]).classed('layer-points')).to.be.true;
|
||||
expect(d3.select(layers[4]).classed('layer-labels')).to.be.true;
|
||||
});
|
||||
|
||||
it('creates default osm point layers', function () {
|
||||
|
||||
Reference in New Issue
Block a user