Files
iD/test/spec/ui/confirm.js
John Firebaugh 7e68e8e114 Add iD.Context
This is a facade interface that ties together a bunch of
different internal objects and will make it easier to write
tests for behaviors, modes, and operations.
2013-02-01 12:40:15 -05:00

15 lines
487 B
JavaScript

describe("iD.ui.confirm", function () {
it('can be instantiated', function () {
var confirm = iD.ui.confirm();
expect(confirm).to.be.ok;
happen.keydown(document, {keyCode: 27}); // dismiss
});
it('can be dismissed', function () {
var confirm = iD.ui.confirm();
happen.click(confirm.select('button').node());
expect(confirm.node().parentNode).to.be.null;
happen.keydown(document, {keyCode: 27}); // dismiss
});
});