Interactive interface for browsing global, full-resolution satellite imagery
add actual click events to test disabled features #1119
Benjamin Kingfb43310414a2
diff --git a/e2e/features/compare/compare-test.js b/e2e/features/compare/compare-test.jsindex 3cead48f3..196cfba40 100644--- a/e2e/features/compare/compare-test.js+++ b/e2e/features/compare/compare-test.js@@ -22,14 +22,20 @@ module.exports = {'Animation, image download, data-download, and events are disabled when in A|B': function(client) {- // check Animation widget+ // Verify Animation widget can't be clicked+ client.click(animationButton);+ client.pause(100);+ client.expect.element('#wv-animation-widget').to.not.be.visible;client.assert.cssClassPresent(animationButton, 'wv-disabled-button');client.assert.attributeContains(animationButton,'title','Animation feature is deactivated when Compare feature is active');- // check image download+ // Verify image download can't be clicked+ client.click(ImageDownloadButton);+ client.pause(100);+ client.expect.element('#wv-image-resolution').to.not.be.present;client.expect.element(ImageDownloadButton + ' #wv-image-button-check').to.not.be.enabled;client.assert.attributeContains(@@ -37,14 +43,20 @@ module.exports = {'title','You must exit comparison mode to use the snapshot feature');- // check events+ // Verify events can't be clicked+ client.click(eventsTabButton);+ client.pause(100);+ client.expect.element('#wv-eventscontent').to.not.be.visible;client.assert.cssClassPresent(eventsTabButton, 'disabled');client.assert.attributeContains(eventsTabButton,'title','You must exit comparison mode to use the natural events feature');- // check Data Download+ // Verify Data Download can't be clicked+ client.click(dataDownloadTabButton);+ client.pause(100);+ client.expect.element('#wv-datacontent').to.not.be.visible;client.assert.cssClassPresent(dataDownloadTabButton, 'disabled');client.assert.attributeContains(dataDownloadTabButton,@@ -63,6 +75,45 @@ module.exports = {client.click(localSelectors.bTab);client.waitForElementVisible(ModisTruecolorLayerB, TIME_LIMIT);},+ /**+ * Remove some layers from active state B and then toggle out of A|B mode to verify+ * that layer-sidebar inherits B state layers+ */+ 'If you exit A|B with B selection active, the active state will then be the B state': function(+ client+ ) {+ client.url(client.globals.url + localQuerystrings.spyAndBIsActive);+ client.waitForElementVisible(+ '#activeB-Reference_Features',+ TIME_LIMIT,+ function() {+ client.expect.element(+ '#activeB-VIIRS_SNPP_CorrectedReflectance_TrueColor'+ ).to.be.visible;+ client.expect.element(+ '#activeB-MODIS_Aqua_CorrectedReflectance_TrueColor'+ ).to.be.visible;+ client.click('#closeactiveBReference_Labels');+ client.click('#closeactiveBReference_Features');+ client.click('#closeactiveBVIIRS_SNPP_CorrectedReflectance_TrueColor');+ client.click('#closeactiveBMODIS_Aqua_CorrectedReflectance_TrueColor');+ client.pause(1000);+ client.click(localSelectors.compareButton);+ client.waitForElementVisible('#guitarpick', TIME_LIMIT, function() {+ client.expect.element('#activeB-Coastlines').to.be.visible;+ client.expect.element(+ '#activeB-MODIS_Terra_CorrectedReflectance_TrueColor'+ ).to.be.visible;+ client.expect.element(+ '#activeB-VIIRS_SNPP_CorrectedReflectance_TrueColor'+ ).to.not.be.present;+ client.expect.element(+ '#activeB-MODIS_Aqua_CorrectedReflectance_TrueColor'+ ).to.not.be.present;+ });+ }+ );+ },after: function(client) {client.end();}