Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Test values within GIF preview are correct #819

Benjamin King4532208674fb
diff --git a/e2e/features/animations/animations.gif.feature b/e2e/features/animations/animations.gif.feature
new file mode 100644
index 000000000..6c1b5031e
--- /dev/null
+++ b/e2e/features/animations/animations.gif.feature
@@ -0,0 +1,36 @@
+Feature: Animation GIF Downloads
+ Choose resolution of imagery and Download GIFs
+
+Scenario: Downloading GIF when custom colormap is activated
+ Given Worldview is in "animation with custom colormap active" state
+ Then I see the "animation widget"
+ When I click the "create GIF button"
+ And I click the "GIF download icon"
+ Then I see "Would you like to temporarily revert"
+ When I click "OK"
+ Then I see the "GIF results" within 6 seconds
+ When I click the "GIF results close button"
+ Then the page doesn't have the "GIF results"
+ And I see the "animation widget"
+
+Scenario: Downloading GIF when polar projection is rotated
+ Given Worldview is in "animation with polar projection rotated" state
+ Then I see the "animation widget"
+ When I click the "create GIF button"
+ And I click the "GIF download icon"
+ Then I see "Would you like to reset rotation"
+ When I click "OK"
+ And I click the "GIF download icon"
+ Then I see the "GIF results" within 6 seconds
+ When I click the "GIF results close button"
+ Then the page doesn't have the "GIF results"
+
+Scenario: GIF selection preview is Accurate
+ Given Worldview is in "animation widget active" state
+ Then I see the "animation widget"
+ When I click the "create GIF button"
+ And I wait 1 seconds
+ Then I see '2018-03-28' in the 'GIF preview start date value'
+ Then I see '2018-04-04' in the 'GIF preview end date value'
+ Then I see '3 Frames Per Second' in the 'GIF preview frame rate value'
+
diff --git a/e2e/globals.js b/e2e/globals.js
index f49b98212..a62f69013 100644
--- a/e2e/globals.js
+++ b/e2e/globals.js
@@ -1,17 +1,43 @@
module.exports = {
url: 'http://localhost:3000/',
production: 'https://worldview.earthdata.nasa.gov/',
+ querystrings: {
+ 'animation widget active': '?p=geographic&l=VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor,Reference_Labels(hidden),Reference_Features(hidden),Coastlines&t=2018-04-04&z=3&v=-177.94712426144758,-46.546875,-5.14662573855243,53.015625&ab=on&as=2018-03-28&ae=2018-04-04&av=3&al=false',
+ 'animation with custom colormap active': '?p=geographic&l=AIRS_CO_Total_Column_Day(palette=red_1)&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=MODIS_Terra_CorrectedReflectance_TrueColor,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&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',
+ 'events tab active': '?e=true'
+ },
selectors: {
- 'eventsTab': '[data-tab="events"]',
- 'dataTab': '[data-tab="download"]',
- 'yearlyResolutionTooltip': '#zoom-years',
- 'timelineSetToYears': '#current-zoom.zoom-years',
- 'modalCloseButton': '.ui-dialog.ui-draggable.ui-resizable .ui-dialog-titlebar-close',
- 'notificationDismissButton': '.ui-dialog.notify-alert .fa-times',
- 'overlayLayerItems': '#overlays li',
- 'resolutionTooltip': '#zoom-btn-container',
- 'notifyMessage': '.notify-alert .notify-message',
- 'clearRotationButton': '#wv-map-arctic > button.wv-map-reset-rotation.wv-map-zoom.ui-button.ui-widget.ui-state-default.ui-corner-all.ui-button-text-only > span'
+ 'info button': '.wv-layers-info',
+ 'options button': '.wv-layers-options',
+ 'info dialog': '[aria-describedby="wv-layers-info-dialog"]',
+ 'options dialog': '[aria-describedby="wv-layers-options-dialog"]',
+ 'layers search field': '#layers-search-input',
+ 'source info icon': '.layers-all-layer .fa-info-circle',
+ 'source metadata close button': '.source-metadata .metadata-more',
+ 'animation widget': '#wv-animation-widget',
+ 'animation button': '#animate-button',
+ 'animation resolution tooltip': '.wv-tooltip-case:first-child',
+ 'yearly resolution tooltip': '.wv-tooltip #yearly',
+ 'timeline set to years': '#zoom-years.depth-1',
+ 'create GIF button': '.fa-file-video-o.wv-animation-widget-icon',
+ 'GIF preview start date value': '.gif-download-grid .grid-child:nth-child(2) span',
+ 'GIF preview end date value': '.gif-download-grid .grid-child:nth-child(4) span',
+ 'GIF preview frame rate value': '.gif-download-grid .grid-child:nth-child(6) span',
+ 'GIF download icon': '.jcrop-holder .fa-download',
+ 'GIF results': '.gif-results-dialog-case img',
+ 'GIF results close button': '.wv-gif-results button.ui-dialog-titlebar-close',
+ 'list of events': '#wv-events ul.map-item-list',
+ 'first event': '#wv-events ul.map-item-list .item:first-child h4',
+ 'selected first event': '#wv-events ul.map-item-list .item-selected:first-child h4',
+ 'selected marker': '.marker-selected',
+ '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',
+ 'overlay layer items': '#overlays li'
},
delay: 3000 // Acceptable delay in ms between performing actions and seeing results
};