Interactive interface for browsing global, full-resolution satellite imagery
Complete API independent events tests
Josiah Sprague46396c6a4309
diff --git a/e2e/features/events/events.feature b/e2e/features/events/events.featureindex bd60ddb0a..525fa39d0 100644--- a/e2e/features/events/events.feature+++ b/e2e/features/events/events.feature@@ -1,23 +1,26 @@Feature: Natural EventsUsers should be able to find imagery related to recent natural events via a list and markers on the map-Background:+Scenario: Selecting Events Tab+ Users should be able to see all available natural events+Given Worldview is in "initial" stateAnd I click "Skip Tour"And I click the "events" tabThen I see the "list of events" within 3 seconds--Scenario: Selecting Events Tab- Users should be able to see all available natural events-- Given I see "Fire"+ And I see "Fire"And I see "Iceberg"And I see "Hurricane"And I see "Volcano"And I see 50+ markers on the mapScenario: Selecting an Event from the List+ Selecting and deselecting events should change the state of the app to display the state related to the event+ Given Worldview is in "initial" state+ And I click "Skip Tour"+ And I click the "events" tab+ Then I see the "list of events" within 3 secondsWhen I click the "first event"Then I see the "selected marker"And I see the "selected first event"@@ -35,4 +38,20 @@ Scenario: Selecting an Event from the ListThen I don't see "Why can’t I see an event?"When I click the "notification dismiss button"And I wait 2 seconds- And I don't see "Events may not be visible at all times"+ Then I don't see "Events may not be visible at all times"+ Then there are 1 tabs open+ When I click the "first external event link"+ Then there are 2 tabs open+ When I close tab number 2+ Then there are 1 tabs open+ And I click the "selected first event"+ Then the page doesn't have the "selected first event"++Scenario: Permalink with events tab+ Given Worldview is in "events tab active" state+ Then I see the "list of events" within 3 seconds+ And I see "Fire"+ And I see "Iceberg"+ And I see "Hurricane"+ And I see "Volcano"+ And I see 50+ markers on the mapdiff --git a/e2e/globals.js b/e2e/globals.jsindex a72af0a0c..0ff7a8d0f 100644--- a/e2e/globals.js+++ b/e2e/globals.js@@ -5,7 +5,8 @@ module.exports = {'animation with custom colormap active': '?p=geographic&l=VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor,AIRS_CO_Total_Column_Day(palette=red_1),Reference_Labels(hidden),Reference_Features(hidden),Coastlines&t=2016-04-08&z=3&v=-223.875,-91.828125,162.84375,98.296875&ab=on&as=2016-03-25&ae=2016-04-08&av=3&al=false','animation with polar projection rotated': '?p=arctic&l=VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor,Reference_Labels(hidden),Reference_Features(hidden),Coastlines&t=2016-12-09&z=3&v=-2764195.2298414493,-88762.12734933128,2589496.903095221,3893331.478195751&r=-18.0000&ab=on&as=2016-12-02&ae=2016-12-09&av=3&al=true','continuous data layers': '?p=geographic&l=MODIS_Terra_Brightness_Temp_Band31_Day,Coastlines(hidden)&t=2015-05-25&z=2&v=-42.148380855752734,42.13121723408824,22.122734950093943,85.16225953076464',- 'multiple data layers':'?p=geographic&l=MODIS_Terra_Aerosol,MODIS_Terra_Brightness_Temp_Band31_Day&t=2017-03-22&z=3&v=136.07019188386334,14.722152527011556,155.59817576644127,24.312819167567586'+ 'multiple data layers':'?p=geographic&l=MODIS_Terra_Aerosol,MODIS_Terra_Brightness_Temp_Band31_Day&t=2017-03-22&z=3&v=136.07019188386334,14.722152527011556,155.59817576644127,24.312819167567586',+ 'events tab active':'?e=true'},selectors: {'info button': '.wv-layers-info',@@ -30,7 +31,8 @@ module.exports = {'selected marker': '.marker-selected','map marker': '.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'+ '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'},delay: 3000 // Acceptable delay in ms between performing actions and seeing results};diff --git a/e2e/step_definitions/utility.js b/e2e/step_definitions/utility.jsindex af0ba0e28..2ac5eddeb 100644--- a/e2e/step_definitions/utility.js+++ b/e2e/step_definitions/utility.js@@ -57,6 +57,23 @@ defineSupportCode(({Given, Then, When}) => {return client;});+ // Check the number of tabs open+ Then('there are {int} tabs open', (count) => {+ return client.windowHandles(function(tabs) {+ client.assert.equal(tabs.value.length, count);+ });+ });++ // Close a tab by index+ Then('I close tab number {int}', (index) => {+ index--;+ return client.windowHandles(function(tabs) {+ client.switchWindow(tabs.value[index]);+ client.closeWindow();+ client.switchWindow(tabs.value[0]);+ });+ });+// Check for a stringThen('I see {string}', (text) => {return client.useCss().assert.containsText('body', text);