diff --git a/test/index.html b/test/index.html
index b270dc49b..2311ebc4c 100644
--- a/test/index.html
+++ b/test/index.html
@@ -14,7 +14,6 @@
-
@@ -29,6 +28,7 @@
+
diff --git a/test/spec/graph/node.js b/test/spec/graph/node.js
index 8045270b3..1f02c1302 100644
--- a/test/spec/graph/node.js
+++ b/test/spec/graph/node.js
@@ -38,12 +38,17 @@ describe('iD.Node', function () {
});
describe("#geometry", function () {
- it("returns 'vertex' if the node is not a point", function () {
- expect(iD.Node().geometry()).to.equal('vertex');
+ it("returns 'vertex' if the node is a member of any way", function () {
+ var node = iD.Node(),
+ way = iD.Way({nodes: [node.id]}),
+ graph = iD.Graph([node, way]);
+ expect(node.geometry(graph)).to.equal('vertex');
});
- it("returns 'point' if the node is a point", function () {
- expect(iD.Node({_poi: true}).geometry()).to.equal('point');
+ it("returns 'point' if the node is not a member of any way", function () {
+ var node = iD.Node(),
+ graph = iD.Graph([node]);
+ expect(node.geometry(graph)).to.equal('point');
});
});
});
diff --git a/test/spec/modes/add_point.js b/test/spec/modes/add_point.js
index 725a7a396..68fe80403 100644
--- a/test/spec/modes/add_point.js
+++ b/test/spec/modes/add_point.js
@@ -3,8 +3,8 @@ describe("iD.modes.AddPoint", function () {
beforeEach(function () {
container = d3.select('body').append('div');
- map = iD.Map();
history = iD.History();
+ map = iD.Map().history(history);
controller = iD.Controller(map, history);
container.call(map);
diff --git a/test/spec/svg/vertices.js b/test/spec/svg/vertices.js
index 8ce5e3a80..be0eec6d2 100644
--- a/test/spec/svg/vertices.js
+++ b/test/spec/svg/vertices.js
@@ -10,7 +10,8 @@ describe("iD.svg.Vertices", function () {
it("adds tag classes", function () {
var node = iD.Node({tags: {highway: "traffic_signals"}, loc: [0, 0]}),
- graph = iD.Graph([node]);
+ way = iD.Way({nodes: [node.id]}),
+ graph = iD.Graph([node, way]);
surface.call(iD.svg.Vertices(projection), graph, [node], filter);
diff --git a/test/spec/ui/inspector.js b/test/spec/ui/inspector.js
index 1a4df1899..d0fd1c136 100644
--- a/test/spec/ui/inspector.js
+++ b/test/spec/ui/inspector.js
@@ -1,10 +1,10 @@
describe("iD.ui.inspector", function () {
var inspector, element,
tags = {highway: 'residential'},
- entity;
+ entity, graph;
function render() {
- inspector = iD.ui.inspector();
+ inspector = iD.ui.inspector().graph(graph);
element = d3.select('body')
.append('div')
.attr('id', 'inspector-wrap')
@@ -14,6 +14,7 @@ describe("iD.ui.inspector", function () {
beforeEach(function () {
entity = iD.Entity({type: 'node', id: "n12345", tags: tags});
+ graph = iD.Graph([entity]);
render();
});