mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
addNote test fix
This commit is contained in:
@@ -26,7 +26,7 @@ describe('iD.modeAddNote', function() {
|
||||
});
|
||||
|
||||
describe('clicking the map', function () {
|
||||
it('adds a note', function() {
|
||||
it('adds a note', function(done) {
|
||||
var note = iD.osmNote({
|
||||
id: '-1',
|
||||
comments: [],
|
||||
@@ -35,9 +35,13 @@ describe('iD.modeAddNote', function() {
|
||||
});
|
||||
happen.mousedown(context.surface().node(), {});
|
||||
happen.mouseup(window, {});
|
||||
expect(iD.services.osm.caches().note.note[-1]).to.eql(note);
|
||||
context.mode().exit();
|
||||
d3.select('window').on('click.draw-block', null);
|
||||
|
||||
window.setTimeout(function() {
|
||||
expect(iD.services.osm.caches().note.note[-1]).to.eql(note);
|
||||
context.mode().exit();
|
||||
d3.select('window').on('click.draw-block', null);
|
||||
done()
|
||||
}, 50);
|
||||
});
|
||||
|
||||
// this won't work because draw behavior can only snap to entities, not notes
|
||||
|
||||
Reference in New Issue
Block a user