Fix tests, silence travis

This commit is contained in:
Ansis Brammanis
2013-02-08 11:29:40 -05:00
parent 151266c75f
commit a804e633f4
2 changed files with 8 additions and 2 deletions

View File

@@ -26,6 +26,7 @@ describe("iD.behavior.Select", function() {
afterEach(function() {
context.uninstall(behavior);
context.mode().exit();
container.remove();
});

View File

@@ -19,6 +19,7 @@ describe("iD.modes.AddPoint", function() {
happen.mousedown(context.surface().node(), {});
happen.mouseup(window, {});
expect(context.changes().created).to.have.length(1);
context.mode().exit();
});
it("selects the node", function() {
@@ -26,13 +27,17 @@ describe("iD.modes.AddPoint", function() {
happen.mouseup(window, {});
expect(context.mode().id).to.equal('select');
expect(context.mode().selection()).to.eql([context.changes().created[0].id]);
context.mode().exit();
});
});
describe("pressing ⎋", function() {
it("exits to browse mode", function() {
it("exits to browse mode", function(done) {
happen.keydown(document, {keyCode: 27});
expect(context.mode().id).to.equal('browse');
window.setTimeout(function() {
expect(context.mode().id).to.equal('browse');
done();
}, 200);
});
});
});