mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-25 15:05:32 +00:00
21 lines
693 B
JavaScript
21 lines
693 B
JavaScript
describe("iD.svg.Points", function () {
|
|
var surface,
|
|
projection = d3.geo.mercator(),
|
|
filter = d3.functor(true);
|
|
|
|
beforeEach(function () {
|
|
surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg'))
|
|
.call(iD.svg.Surface());
|
|
});
|
|
|
|
it("adds tag classes", function () {
|
|
var node = iD.Node({tags: {amenity: "cafe"}, loc: [0, 0], _poi: true}),
|
|
graph = iD.Graph([node]);
|
|
|
|
surface.call(iD.svg.Points(), graph, [node], filter, projection);
|
|
|
|
expect(surface.select('.point')).to.be.classed('tag-amenity');
|
|
expect(surface.select('.point')).to.be.classed('tag-amenity-cafe');
|
|
});
|
|
});
|