Interactive interface for browsing global, full-resolution satellite imagery
fix copmare e2e tests
Benjamin King8c8dbea35f6a
diff --git a/e2e/features/compare/layer-dialog-test.js b/e2e/features/compare/layer-dialog-test.jsindex 0369db598..c586248e8 100644--- a/e2e/features/compare/layer-dialog-test.js+++ b/e2e/features/compare/layer-dialog-test.js@@ -11,11 +11,11 @@ const AodInfoPanel = '.layer_info_modal-modis_terra_aerosol';const correctedReflectanceBLayer ='#activeB-MODIS_Terra_CorrectedReflectance_TrueColor';const correctedReflectanceOptionsPanelHeader =- '#wv-options-header-MODIS_Terra_CorrectedReflectance_TrueColor';+ '#layer_options_modal-modis_terra_correctedreflectance_truecolor .modal-header';const correctedReflectanceOptionsPanelBody =- '#wv-options-body-MODIS_Terra_CorrectedReflectance_TrueColor';+ '#layer_options_modal-modis_terra_correctedreflectance_truecolor .modal-body';const correctedReflectanceInfoPanel =- '.wv-info-panel-MODIS_Terra_CorrectedReflectance_TrueColor';+ '#layer_info_modal-modis_terra_correctedreflectance_truecolor';module.exports = {before: function(client) {@@ -88,7 +88,7 @@ module.exports = {client.click(AodOptionsPanelHeader + ' .close').pause(1000);client.click(aerosolLayer + ' .wv-layers-info');client.waitForElementVisible(- AodInfoPanel + ' .layer-metadata',+ AodInfoPanel + ' .layer-description',TIME_LIMIT,function() {client@@ -141,7 +141,9 @@ module.exports = {);},'Layer info dialog works after clicking into B mode': function(client) {- client.click(AodOptionsPanelHeader + ' .close').pause(1000);+ client+ .click(correctedReflectanceOptionsPanelHeader + ' .close')+ .pause(1000);client.click(correctedReflectanceBLayer + ' .wv-layers-info');client.waitForElementVisible(correctedReflectanceInfoPanel + ' .layer-metadata',diff --git a/e2e/features/compare/timeline-test.js b/e2e/features/compare/timeline-test.jsindex a5e1533f7..03e457c8c 100644--- a/e2e/features/compare/timeline-test.js+++ b/e2e/features/compare/timeline-test.js@@ -1,8 +1,8 @@const reuseables = require('../../reuseables/skip-tour.js');const localSelectors = require('../../reuseables/selectors.js');const localQuerystrings = require('../../reuseables/querystrings.js');-const activeDragger = '.ab-group-case-active';-const inactiveDragger = '.ab-group-case-inactive';+const draggerA = '.timeline-dragger.draggerA ';+const draggerB = '.timeline-dragger.draggerB ';const dateSelectorDayInput = '#date-selector-main .input-wrapper-day input';const dateSelectorMonthInput = '#date-selector-main .input-wrapper-month input';const TIME_LIMIT = 20000;@@ -17,11 +17,8 @@ module.exports = {client.waitForElementVisible(localSelectors.swipeDragger, TIME_LIMIT);},'Verify that A|B draggers are visible': function(client) {- client.expect.element(activeDragger).to.be.visible;- client.expect.element(inactiveDragger).to.be.visible;- },- 'Verify that Guitar pick is not visible': function(client) {- client.expect.element('#guitarpick').to.not.be.visible;+ client.expect.element(draggerA).to.be.visible;+ client.expect.element(draggerB).to.be.visible;},'Dragging active dragger updates date': function(client) {client.assert.attributeContains(dateSelectorDayInput, 'value', '17');@@ -29,9 +26,9 @@ module.exports = {client.useCss()- .moveToElement(activeDragger, 10, 10)+ .moveToElement(draggerA, 30, 20).mouseButtonDown(0)- .moveToElement('#timeline-header', 0, 0)+ .moveToElement(draggerB, -100, 0).mouseButtonUp(0).pause(2000);client.getValue(dateSelectorDayInput, function(dayResult) {@@ -45,7 +42,7 @@ module.exports = {client.assert.cssClassPresent(localSelectors.aTab, 'active');client.useCss()- .moveToElement(inactiveDragger, 10, 10)+ .moveToElement(draggerB, 30, 20).mouseButtonDown(0).mouseButtonUp(0);// Reference labels were not active in A but are in B@@ -58,26 +55,34 @@ module.exports = {);},'Dragging B dragger updates date in label': function(client) {- client.useCss().assert.containsText(localSelectors.bTab, 'B: 2018-08-16');+ client.useCss().assert.containsText(localSelectors.bTab, '2018-08-16');client.useCss()- .moveToElement(activeDragger, 10, 10)+ .moveToElement(draggerB, 30, 20).mouseButtonDown(0)- .moveToElement('#timeline-header', 0, 0)+ .moveToElement(draggerA, -100, 0).mouseButtonUp(0).pause(2000);client.getText(localSelectors.bTab, function(result) {this.assert.notEqual('B: 2018-08-16', result.value);});},- 'Deactivate A|B and verify guitarpick is the only dragger visible': function(- client- ) {+ 'Deactivate A|B is no longer active': function(client) {client.click(localSelectors.compareButton);- client.waitForElementVisible('#guitarpick', TIME_LIMIT, function() {- client.expect.element(activeDragger).to.not.be.visible;- client.expect.element(inactiveDragger).to.not.be.visible;- });+ client.waitForElementNotPresent(+ localSelectors.bTab,+ TIME_LIMIT,+ function() {+ client+ .useCss()+ .assert.containsText(+ localSelectors.compareButton,+ 'Start Comparison'+ );+ client.expect.element(draggerA).to.not.be.present;+ client.expect.element(draggerB).to.be.visible;+ }+ );},after: function(client) {client.end();