Skip to content

Commit

Permalink
Fix for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarto committed Feb 27, 2018
1 parent 6cf2069 commit 8fe405f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions web/client/components/map/openlayers/__tests__/Map-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,8 @@ describe('OpenlayersMap', () => {
expect(spy.calls[1].arguments[3].width).toExist();
done();
});
setTimeout(() => {
olMap.getView().setZoom(12);
}, 0);
olMap.getView().setZoom(12);
olMap.dispatchEvent('moveend');
});

it('check if the handler for "moveend" event is called after setCenter', (done) => {
Expand Down Expand Up @@ -321,9 +320,8 @@ describe('OpenlayersMap', () => {
expect(spy.calls[1].arguments[3].width).toExist();
done();
});
setTimeout(() => {
olMap.getView().setCenter(ol.proj.transform([10, 44], 'EPSG:4326', 'EPSG:3857'));
}, 0);
olMap.getView().setCenter(ol.proj.transform([10, 44], 'EPSG:4326', 'EPSG:3857'));
olMap.dispatchEvent('moveend');
});

it('check if the map changes when receive new props', () => {
Expand Down

0 comments on commit 8fe405f

Please sign in to comment.