Interactive interface for browsing global, full-resolution satellite imagery
Add check for layer additions when selecting events
Josiah Sprague29f8f4c14318
diff --git a/e2e/features/events/events.feature b/e2e/features/events/events.featureindex 525fa39d0..3461aeaf4 100644--- a/e2e/features/events/events.feature+++ b/e2e/features/events/events.feature@@ -12,7 +12,7 @@ Scenario: Selecting Events TabAnd I see "Iceberg"And I see "Hurricane"And I see "Volcano"- And I see 50+ markers on the map+ And the page has at least 50 "map markers"Scenario: Selecting an Event from the ListSelecting and deselecting events should change the state of the app to display the state related to the event@@ -39,6 +39,7 @@ Scenario: Selecting an Event from the ListWhen I click the "notification dismiss button"And I wait 2 secondsThen I don't see "Events may not be visible at all times"+ And the page has at least 4 "overlay layer items"Then there are 1 tabs openWhen I click the "first external event link"Then there are 2 tabs open@@ -54,4 +55,4 @@ Scenario: Permalink with events tabAnd I see "Iceberg"And I see "Hurricane"And I see "Volcano"- And I see 50+ markers on the map+ And the page has at least 50 "map markers"diff --git a/e2e/globals.js b/e2e/globals.jsindex 0ff7a8d0f..63515fa74 100644--- a/e2e/globals.js+++ b/e2e/globals.js@@ -29,10 +29,11 @@ module.exports = {'first event': '#wv-events ul.map-item-list .item:first-child','selected first event': '#wv-events ul.map-item-list .item-selected:first-child','selected marker': '.marker-selected',- 'map marker': '.ol-viewport .marker',+ 'map markers': '.ol-viewport .marker','modal close button': '.ui-dialog.ui-draggable.ui-resizable .ui-dialog-titlebar-close','notification dismiss button': '.ui-dialog.notify-alert .fa-times',- 'first external event link': '#wv-events ul.map-item-list .item:first-child .natural-event-link:first-child'+ 'first external event link': '#wv-events ul.map-item-list .item:first-child .natural-event-link:first-child',+ 'overlay layer items': '#overlays li'},delay: 3000 // Acceptable delay in ms between performing actions and seeing results};diff --git a/e2e/step_definitions/events.js b/e2e/step_definitions/events.jsdeleted file mode 100644index fcc2f41e3..000000000--- a/e2e/step_definitions/events.js+++ /dev/null@@ -1,10 +0,0 @@-const {client} = require('nightwatch-cucumber');-const {defineSupportCode} = require('cucumber');--defineSupportCode(({Then}) => {-- Then('I see {int}+ markers on the map', (count) => {- return client.assert.elementCountGreater(client.globals.selectors['map marker'], count);- });--});diff --git a/e2e/step_definitions/utility.js b/e2e/step_definitions/utility.jsindex 2ac5eddeb..f9f20ddfd 100644--- a/e2e/step_definitions/utility.js+++ b/e2e/step_definitions/utility.js@@ -109,6 +109,11 @@ defineSupportCode(({Given, Then, When}) => {return client.useCss().expect.element(selectors[key]||key).to.not.be.present;});+ // Check for a count of elements+ Then('the page has at least {int} {string}', (count, selector) => {+ return client.assert.elementCountGreater(client.globals.selectors[selector], count);+ });+// Check that an element is hiddenThen('I don\'t see the {string}', (key) => {return client.useCss().expect.element(selectors[key]||key).to.not.be.visible;