Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

update tests

Jason Kent7c05f5d18f80
diff --git a/e2e/features/compare/compare-test.js b/e2e/features/compare/compare-test.js
index 7126bf645..6a11ca822 100644
--- a/e2e/features/compare/compare-test.js
+++ b/e2e/features/compare/compare-test.js
@@ -79,7 +79,8 @@ module.exports = {
'Removing layer removes correct layer from correct layer group': (c) => {
c.expect.element(ModisTruecolorLayerA).to.be.visible;
- c.click('#closeactiveMODIS_Terra_CorrectedReflectance_TrueColor');
+ c.moveToElement(ModisTruecolorLayerA, 1, 1).pause(200);
+ c.click('#close-activeMODIS_Terra_CorrectedReflectance_TrueColor');
c.pause(100);
c.expect.element(ModisTruecolorLayerA).to.not.be.present;
c.expect.element(ModisTruecolorLayerB).to.not.be.present;
@@ -115,11 +116,20 @@ module.exports = {
.to.be.visible;
c.expect.element('#activeB-MODIS_Aqua_CorrectedReflectance_TrueColor')
.to.be.visible;
- c.click('#closeactiveBReference_Labels');
- c.click('#closeactiveBReference_Features');
- c.click('#closeactiveBVIIRS_SNPP_CorrectedReflectance_TrueColor');
- c.click('#closeactiveBMODIS_Aqua_CorrectedReflectance_TrueColor');
- c.pause(1000);
+
+ c.moveToElement('#activeB-Reference_Labels', 1, 1).pause(200);
+ c.click('#close-activeBReference_Labels');
+
+ c.moveToElement('#activeB-Reference_Features', 1, 1).pause(200);
+ c.click('#close-activeBReference_Features');
+
+ c.moveToElement('#activeB-VIIRS_SNPP_CorrectedReflectance_TrueColor', 1, 1).pause(200);
+ c.click('#close-activeBVIIRS_SNPP_CorrectedReflectance_TrueColor');
+
+ c.moveToElement('#activeB-MODIS_Aqua_CorrectedReflectance_TrueColor', 1, 1).pause(200);
+ c.click('#close-activeBMODIS_Aqua_CorrectedReflectance_TrueColor');
+
+ c.pause(500);
c.click(localSelectors.compareButton);
c.waitForElementNotPresent(
'.timeline-dragger.draggerA',
diff --git a/e2e/features/compare/layer-dialog-test.js b/e2e/features/compare/layer-dialog-test.js
index 1f7d65e9c..6328daf50 100644
--- a/e2e/features/compare/layer-dialog-test.js
+++ b/e2e/features/compare/layer-dialog-test.js
@@ -13,42 +13,35 @@ const correctedReflectanceOptionsPanelBody = '#layer_options_modal-modis_terra_c
const correctedReflectanceInfoPanel = '#layer_info_modal-modis_terra_correctedreflectance_truecolor';
module.exports = {
- before(client) {
- reuseables.loadAndSkipTour(client, TIME_LIMIT);
+ before(c) {
+ reuseables.loadAndSkipTour(c, TIME_LIMIT);
},
- 'Layer option features work in A|B mode': function(client) {
- client.url(client.globals.url + localQuerystrings.swipeAOD);
-
- client.waitForElementVisible(aerosolLayer, TIME_LIMIT, () => {
- client.expect.element(AodOptionsPanelBody).to.not.be.present;
- client.click(`${aerosolLayer} .wv-layers-options`);
- client.waitForElementVisible(
- '.layer-settings-modal',
- TIME_LIMIT,
- () => {
- client.pause(1000);
- client
- .useCss()
- .assert.containsText(
- `${AodOptionsPanelHeader} .modal-title`,
- 'Aerosol Optical Depth',
- );
- if (client.options.desiredCapabilities.browser !== 'ie') {
- client.expect.element(`${AodOptionsPanelBody} .wv-palette-selector`)
- .to.be.visible;
- }
- },
- );
- });
+ 'Layer option features work in A|B mode': (c) => {
+ c.url(c.globals.url + localQuerystrings.swipeAOD);
+ c.waitForElementVisible(aerosolLayer, TIME_LIMIT);
+ c.expect.element(AodOptionsPanelBody).to.not.be.present;
+ c.moveToElement(aerosolLayer, 1, 1).pause(200);
+ c.click(`${aerosolLayer} .wv-layers-options`);
+ c.waitForElementVisible('.layer-settings-modal', TIME_LIMIT);
+ c.pause(500);
+ c.assert.containsText(
+ `${AodOptionsPanelHeader} .modal-title`,
+ 'Aerosol Optical Depth',
+ );
+ if (c.options.desiredCapabilities.browser !== 'ie') {
+ c.expect.element(`${AodOptionsPanelBody} .wv-palette-selector`)
+ .to.be.visible;
+ }
},
- 'Layer info dialog works in A|B mode': function(client) {
- client.click(`${AodOptionsPanelHeader} .close`).pause(1000);
- client.click(`${aerosolLayer} .wv-layers-info`);
- client.waitForElementVisible(
+ 'Layer info dialog works in A|B mode': (c) => {
+ c.click(`${AodOptionsPanelHeader} .close`).pause(500);
+ c.moveToElement(aerosolLayer, 1, 1).pause(200);
+ c.click(`${aerosolLayer} .wv-layers-info`);
+ c.waitForElementVisible(
`${AodInfoPanel} .layer-description`,
TIME_LIMIT,
() => {
- client
+ c
.useCss()
.assert.containsText(
AodInfoPanel,
@@ -57,36 +50,38 @@ module.exports = {
},
);
},
- 'expect clicking A|B button to close options dialog': function(client) {
- client.click(`${AodInfoPanel} .close`).pause(1000);
- client.click(localSelectors.compareButton);
- client.waitForElementVisible(aerosolLayer, TIME_LIMIT, () => {
- client.expect.element(AodOptionsPanelBody).to.not.be.present;
+ 'expect clicking A|B button to close options dialog': (c) => {
+ c.click(`${AodInfoPanel} .close`).pause(500);
+ c.click(localSelectors.compareButton);
+ c.waitForElementVisible(aerosolLayer, TIME_LIMIT, () => {
+ c.expect.element(AodOptionsPanelBody).to.not.be.present;
});
},
- 'Layer option features after exiting A|B mode': function(client) {
- client.click(`${aerosolLayer} .wv-layers-options`);
- client.waitForElementVisible(AodOptionsPanelBody, TIME_LIMIT, () => {
- client
+ 'Layer option features after exiting A|B mode': (c) => {
+ c.moveToElement(aerosolLayer, 1, 1).pause(200);
+ c.click(`${aerosolLayer} .wv-layers-options`);
+ c.waitForElementVisible(AodOptionsPanelBody, TIME_LIMIT, () => {
+ c
.useCss()
.assert.containsText(
`${AodOptionsPanelHeader} .modal-title`,
'Aerosol Optical Depth',
);
- if (client.options.desiredCapabilities.browser !== 'ie') {
- client.expect.element(`${AodOptionsPanelBody} .wv-palette-selector`).to
+ if (c.options.desiredCapabilities.browser !== 'ie') {
+ c.expect.element(`${AodOptionsPanelBody} .wv-palette-selector`).to
.be.visible;
}
});
},
- 'Layer info dialog works after exiting A|B mode': function(client) {
- client.click(`${AodOptionsPanelHeader} .close`).pause(1000);
- client.click(`${aerosolLayer} .wv-layers-info`);
- client.waitForElementVisible(
+ 'Layer info dialog works after exiting A|B mode': (c) => {
+ c.click(`${AodOptionsPanelHeader} .close`).pause(500);
+ c.moveToElement(aerosolLayer, 1, 1).pause(200);
+ c.click(`${aerosolLayer} .wv-layers-info`);
+ c.waitForElementVisible(
`${AodInfoPanel} .layer-description`,
TIME_LIMIT,
() => {
- client
+ c
.useCss()
.assert.containsText(
AodInfoPanel,
@@ -96,55 +91,46 @@ module.exports = {
);
},
'expect reactivating A|B to close options dialog and activate B state': function(
- client,
+ c,
) {
- client.click(`${AodInfoPanel} .close`).pause(1000);
- client.click(`${aerosolLayer} .wv-layers-options`).pause(1000);
- client.click(`${AodOptionsPanelHeader} .close`).pause(1000);
- client.click(localSelectors.compareButton);
- client.waitForElementVisible(aerosolLayer, TIME_LIMIT, () => {
- client.pause(1000);
- client.expect.element(AodOptionsPanelBody).to.not.be.present;
- client.click(localSelectors.bTab);
+ c.click(`${AodInfoPanel} .close`).pause(500);
+ c.moveToElement(aerosolLayer, 1, 1).pause(200);
+ c.click(`${aerosolLayer} .wv-layers-options`).pause(500);
+ c.click(`${AodOptionsPanelHeader} .close`).pause(500);
+ c.click(localSelectors.compareButton);
+ c.waitForElementVisible(aerosolLayer, TIME_LIMIT, () => {
+ c.pause(500);
+ c.expect.element(AodOptionsPanelBody).to.not.be.present;
+ c.click(localSelectors.bTab);
});
},
- 'Layer option features work in B state': function(client) {
- client.waitForElementVisible(
- correctedReflectanceBLayer,
- TIME_LIMIT,
- () => {
- client.expect.element(AodOptionsPanelBody).to.not.be.present;
- client.click(`${correctedReflectanceBLayer} .wv-layers-options`);
- client.waitForElementVisible(
- '.layer-settings-modal',
- TIME_LIMIT,
- () => {
- client
- .useCss()
- .assert.containsText(
- `${correctedReflectanceOptionsPanelHeader} .modal-title`,
- 'Corrected Reflectance (True Color)',
- );
- if (client.options.desiredCapabilities.browser !== 'ie') {
- client.expect.element(
- `${correctedReflectanceOptionsPanelBody} .wv-palette-selector`,
- ).to.not.be.present;
- }
- },
- );
- },
+ 'Layer option features work in B state': (c) => {
+ c.waitForElementVisible(correctedReflectanceBLayer, TIME_LIMIT);
+ c.expect.element(AodOptionsPanelBody).to.not.be.present;
+ c.moveToElement(correctedReflectanceBLayer, 1, 1).pause(200);
+ c.click(`${correctedReflectanceBLayer} .wv-layers-options`);
+ c.waitForElementVisible('.layer-settings-modal', TIME_LIMIT);
+ c.assert.containsText(
+ `${correctedReflectanceOptionsPanelHeader} .modal-title`,
+ 'Corrected Reflectance (True Color)',
);
+ if (c.options.desiredCapabilities.browser !== 'ie') {
+ c.expect.element(
+ `${correctedReflectanceOptionsPanelBody} .wv-palette-selector`,
+ ).to.not.be.present;
+ }
},
- 'Layer info dialog works after clicking into B mode': function(client) {
- client.click(`${correctedReflectanceOptionsPanelHeader} .close`);
- client.waitForElementNotPresent('#layer_options_modal-modis_terra_correctedreflectance_truecolor .modal-header', TIME_LIMIT);
- client.click(`${correctedReflectanceBLayer} .wv-layers-info`);
- client.pause(500);
- client.waitForElementVisible(
+ 'Layer info dialog works after clicking into B mode': (c) => {
+ c.click(`${correctedReflectanceOptionsPanelHeader} .close`);
+ c.waitForElementNotPresent('#layer_options_modal-modis_terra_correctedreflectance_truecolor .modal-header', TIME_LIMIT);
+ c.moveToElement(correctedReflectanceBLayer, 1, 1).pause(200);
+ c.click(`${correctedReflectanceBLayer} .wv-layers-info`);
+ c.pause(500);
+ c.waitForElementVisible(
`${correctedReflectanceInfoPanel} .layer-metadata`,
TIME_LIMIT,
() => {
- client
+ c
.useCss()
.assert.containsText(
correctedReflectanceInfoPanel,
@@ -153,7 +139,7 @@ module.exports = {
},
);
},
- after(client) {
- client.end();
+ after(c) {
+ c.end();
},
};
diff --git a/e2e/features/events/events-test.js b/e2e/features/events/events-test.js
index 04356c997..217377e11 100644
--- a/e2e/features/events/events-test.js
+++ b/e2e/features/events/events-test.js
@@ -79,10 +79,10 @@ module.exports = {
c.click(secondEvent);
c.waitForElementVisible(trackMarker, TIME_LIMIT, () => {
c.expect.elements(trackMarker).count.to.equal(5);
- c.click(globalSelectors.dataTab).pause(2000);
+ c.click(layersTab).pause(500);
c.expect.element(trackMarker).to.not.be.present;
c.expect.element(eventIcons).to.not.be.present;
- c.click(globalSelectors.eventsTab).pause(2000);
+ c.click(globalSelectors.eventsTab).pause(500);
c.expect.element(trackMarker).to.be.present;
c.expect.element(eventIcons).to.be.present;
});
@@ -119,14 +119,14 @@ module.exports = {
'Clicking event notification opens explanation in dialog': (c) => {
const globalSelectors = c.globals.selectors;
- c.click(globalSelectors.notifyMessage).pause(2000);
+ c.click(globalSelectors.notifyMessage).pause(500);
c.assert.containsText(
'#event_visibility_info .wv-data-unavailable-header',
'Why can’t I see an event?',
);
- c.click('#event_visibility_info .close').pause(2000);
+ c.click('#event_visibility_info .close').pause(500);
c.expect.element('#event_visibility_info').to.not.be.present;
- c.click(globalSelectors.notificationDismissButton).pause(2000);
+ c.click(globalSelectors.notificationDismissButton).pause(500);
c.expect.element(globalSelectors.notificationDismissButton).to.not.be
.present;
},
@@ -139,7 +139,7 @@ module.exports = {
c.windowHandles((tabs) => {
c.assert.equal(tabs.value.length, 1);
});
- c.click(firstExternalEventLink).pause(2000);
+ c.click(firstExternalEventLink).pause(500);
c.windowHandles((tabs) => {
c.assert.equal(tabs.value.length, 2);
});
diff --git a/e2e/features/layers/options-test.js b/e2e/features/layers/options-test.js
index 58a0d52a5..e4636bc43 100644
--- a/e2e/features/layers/options-test.js
+++ b/e2e/features/layers/options-test.js
@@ -15,13 +15,14 @@ module.exports = {
},
'Verify that settings button opens settings modal': function(client) {
client.url(client.globals.url + customsSquashedQuerystring);
+ client.moveToElement('#active-MODIS_Combined_Value_Added_AOD', 1, 1);
client.waitForElementVisible(
combinedAodSettingsButton,
TIME_LIMIT,
(e) => {
if (client.options.desiredCapabilities.browser !== 'ie') {
client.expect.element(thresholdMinLabel).to.not.be.present;
- client.click(combinedAodSettingsButton).pause(1000);
+ client.click(combinedAodSettingsButton);
client.waitForElementPresent(thresholdMinLabel, TIME_LIMIT);
}
},
@@ -39,7 +40,8 @@ module.exports = {
if (client.options.desiredCapabilities.browser !== 'ie') {
client.useCss().assert.containsText(thresholdMinLabel, '0.1 – 0.105');
client.useCss().assert.containsText(opacityLabel, '70%');
- client.click(terraAodSettingsButton).pause(1000);
+ client.moveToElement('#active-MODIS_Terra_Aerosol', 1, 1).pause(200);
+ client.click(terraAodSettingsButton);
client.waitForElementPresent(
terraAodSettingsDialog,
TIME_LIMIT,
diff --git a/e2e/features/palettes/disable-test.js b/e2e/features/palettes/disable-test.js
index 81126b799..3a9a61aed 100644
--- a/e2e/features/palettes/disable-test.js
+++ b/e2e/features/palettes/disable-test.js
@@ -12,6 +12,7 @@ module.exports = {
'Verify that toggling class updates permalink and layer-legend': (client) => {
client.waitForElementVisible('#active-Last_of_the_Wild_1995-2004', TIME_LIMIT, () => {
client.expect.element('#active-Last_of_the_Wild_1995-2004 .disabled-classification').to.not.be.present;
+ client.moveToElement('#active-Last_of_the_Wild_1995-2004', 1, 1).pause(200);
client.click('#active-Last_of_the_Wild_1995-2004 .wv-layers-options');
client.waitForElementVisible('.layer-classification-toggle', 2000, () => {
client.click('.classification-list .react-switch-case .react-switch-button');