Interactive interface for browsing global, full-resolution satellite imagery
Create tests that res limits disable download #819
Benjamin King2f8ae427729f
diff --git a/e2e/features/animations/animations.gif.feature b/e2e/features/animations/animations.gif.featureindex 6c1b5031e..ba74d06e0 100644--- a/e2e/features/animations/animations.gif.feature+++ b/e2e/features/animations/animations.gif.feature@@ -25,7 +25,7 @@ Scenario: Downloading GIF when polar projection is rotatedWhen I click the "GIF results close button"Then the page doesn't have the "GIF results"-Scenario: GIF selection preview is Accurate+Scenario: GIF selection preview is Accurate and selections that are too high disable GIF downloadGiven Worldview is in "animation widget active" stateThen I see the "animation widget"When I click the "create GIF button"@@ -33,4 +33,10 @@ Scenario: GIF selection preview is AccurateThen 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'+ Then I see a value of '40' in the 'GIF preview resolution selector'+ Then I click the 'GIF preview resolution option 250m'+ And I wait 1 seconds+ Then I see a value of '1' in the 'GIF preview resolution selector'+ Then I see 'GIF download icon' has style property 'color' equal to 'rgba(0, 0, 0, 0)'+ Then I see 'GIF download button' is disableddiff --git a/e2e/globals.js b/e2e/globals.jsindex a62f69013..6c521ebac 100644--- a/e2e/globals.js+++ b/e2e/globals.js@@ -26,7 +26,10 @@ module.exports = {'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 preview resolution selector': '.gif-selector-case #gif-resolution',+ 'GIF preview resolution option 250m': '#gif-resolution option[value="1"]','GIF download icon': '.jcrop-holder .fa-download',+ 'GIF download button': '.animation-gif-dialog-wrapper .wv-button','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',diff --git a/e2e/step_definitions/utility.js b/e2e/step_definitions/utility.jsindex 386fa4544..23d9745f7 100644--- a/e2e/step_definitions/utility.js+++ b/e2e/step_definitions/utility.js@@ -32,14 +32,19 @@ defineSupportCode(({ Given, Then, When }) => {return client.useCss().click(selectors[key] || key);});+ // Input a value into a keyed element+ When('I input {string} in the {string}', (value, key) => {+ return client.useCss().setValue(selectors[key] || key, value);+ });+// Click a Worldview tabWhen('I click the {string} tab', (name) => {return client.useCss().click('[data-tab="' + name + '"]');});- // Input a value into a keyed element- When('I input {string} in the {string}', (value, key) => {- return client.useCss().setValue(selectors[key] || key, value);+ // Check value of input+ When('I see a value of {string} in the {string}', (value, key) => {+ return client.assert.value(selectors[key] || key, value);});// Pause for n seconds@@ -92,6 +97,20 @@ defineSupportCode(({ Given, Then, When }) => {return client.useCss().assert.containsText(selectors[key] || key, text);});+ // check for a class in an element+ Then('I see the class {string} in the {string}', (text, key) => {+ return client.assert.cssClassPresent(selectors[key] || key, text);+ });++ // check if a class is disabled+ Then('I see {string} is disabled', (key) => {+ return client.expect.element(selectors[key] || key).to.not.be.enabled;+ });++ // check if an element has a css property+ Then('I see {string} has style property {string} equal to {string}', (key, prop, value) => {+ return client.assert.cssProperty(selectors[key] || key, prop, value);+ });// Check that an element is visible by predefined selectorThen('I see the {string}', (key) => {return client.useCss().expect.element(selectors[key] || key).to.be.visible;