mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-21 18:43:23 +00:00
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.
15 lines
487 B
JavaScript
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
|
|
});
|
|
});
|