Merge pull request #8635 from openstreetmap/noteTest-BuildFailures

AddNote test fix
This commit is contained in:
Milos Brzakovic
2021-08-12 15:05:11 +02:00
committed by GitHub

View File

@@ -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