diff --git a/umap/static/umap/test/Choropleth.js b/umap/static/umap/test/Choropleth.js index f87e7cce..1cd8c2ec 100644 --- a/umap/static/umap/test/Choropleth.js +++ b/umap/static/umap/test/Choropleth.js @@ -205,7 +205,7 @@ describe('L.U.Choropleth', function () { }) after(function () { this.server.restore() - //resetMap() + resetMap() }) describe('#init()', function () { diff --git a/umap/static/umap/test/Controls.js b/umap/static/umap/test/Controls.js index 5541376b..00616316 100644 --- a/umap/static/umap/test/Controls.js +++ b/umap/static/umap/test/Controls.js @@ -78,7 +78,7 @@ describe('L.U.Controls', function () { describe('#exportPanel()', function () { it('should be opened at datalayer button click', function () { - let button = qs('.leaflet-control-embed a') + let button = qs('.leaflet-control-embed button') assert.ok(button) happen.click(button) assert.ok(qs('#umap-ui-container .umap-share')) diff --git a/umap/static/umap/test/DataLayer.js b/umap/static/umap/test/DataLayer.js index c2094f90..3c545ff8 100644 --- a/umap/static/umap/test/DataLayer.js +++ b/umap/static/umap/test/DataLayer.js @@ -341,7 +341,7 @@ describe('L.U.DataLayer', function () { happen.click( qs('#browse_data_toggle_' + L.stamp(this.datalayer) + ' .layer-edit') ) - deleteLink = qs('a.delete_datalayer_button') + deleteLink = qs('button.delete_datalayer_button') assert.ok(deleteLink) }) diff --git a/umap/static/umap/test/Map.js b/umap/static/umap/test/Map.js index 9bcc7cfb..12b64d73 100644 --- a/umap/static/umap/test/Map.js +++ b/umap/static/umap/test/Map.js @@ -50,7 +50,7 @@ describe('L.U.Map', function () { }) it('enable edit on click on toggle button', function () { - var el = qs('div.leaflet-control-edit-enable a') + var el = qs('div.leaflet-control-edit-enable button') happen.click(el) assert.isTrue(L.DomUtil.hasClass(document.body, 'umap-edit-enabled')) }) @@ -109,7 +109,7 @@ describe('L.U.Map', function () { var button = qs('a.update-map-settings') assert.ok(button, 'update map info button exists') happen.click(button) - var deleteLink = qs('a.umap-delete') + var deleteLink = qs('button.umap-delete') assert.ok(deleteLink, 'delete map button exists') sinon.spy(window, 'confirm') this.server.respondWith('POST', path, JSON.stringify({ redirect: '#' })) @@ -301,7 +301,7 @@ describe('L.U.Map', function () { }) it('should update title bar (umap format import)', function () { - var title = qs('#map div.umap-main-edit-toolbox a.map-name') + var title = qs('#map div.umap-main-edit-toolbox button.map-name') assert.equal(title.innerHTML, 'Imported map') }) diff --git a/umap/static/umap/test/_pre.js b/umap/static/umap/test/_pre.js index 836a3c91..5df2e152 100644 --- a/umap/static/umap/test/_pre.js +++ b/umap/static/umap/test/_pre.js @@ -44,7 +44,7 @@ var resetMap = function () { document.body.className = '' } var enableEdit = function () { - happen.click(qs('div.leaflet-control-edit-enable a')) + happen.click(qs('div.leaflet-control-edit-enable button')) } var disableEdit = function () { happen.click(qs('.leaflet-control-edit-disable')) @@ -57,7 +57,7 @@ var clickCancel = function () { window.confirm = function (text) { return true } - happen.click(qs('a.leaflet-control-edit-cancel')) + happen.click(qs('button.leaflet-control-edit-cancel')) happen.once(document.body, { type: 'keypress', keyCode: 13 }) window.confirm = _confirm }