Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Fix layers e2e tests

Benjamin King9d23135fc13a
diff --git a/e2e/features/layers/layers-test.js b/e2e/features/layers/layers-test.js
index e16fea5cc..2d35f3652 100644
--- a/e2e/features/layers/layers-test.js
+++ b/e2e/features/layers/layers-test.js
@@ -81,15 +81,7 @@ module.exports = {
.expect.element(localSelectors.layersAll)
.text.not.contains('(VIIRS) Corrected Reflectance');
},
- 'Close Layer modal': function(client) {
- client.click(localSelectors.layersModalCloseButton)
- .pause(2000);
- client.useCss().expect.element(localSelectors.layersAll).to.not.be.present;
- },
- 'Open Layer modal and click breadcrumb to return to main selection': function(
- client
- ) {
- client.click(localSelectors.addLayers);
+ 'Click breadcrumb to return to main selection': function(client) {
client.waitForElementVisible(
localSelectors.backToCategories,
TIME_LIMIT,
@@ -102,14 +94,27 @@ module.exports = {
}
);
},
+ 'Close Layer modal': function(client) {
+ client.click(localSelectors.layersModalCloseButton).pause(2000);
+ client.useCss().expect.element(localSelectors.layersAll).to.not.be.present;
+ },
'Browsing Layers by Category: Aerosol Optical Depth': function(client) {
+ client.click(localSelectors.addLayers).pause(2000);
client.click(localSelectors.aerosolOpticalDepth);
- client.waitForElementVisible(localSelectors.headerForAOD, 20000, function(e) { // This is a very slow process
+ client.waitForElementVisible(localSelectors.headerForAOD, 20000, function(
+ e
+ ) {
+ // This is a very slow process
/* Not found
client.click('[aria-labelledby="accordion-legacy-all-aerosol-optical-depth"] > ul > li:nth-child(3) > a')
.pause(1000);
*/
- client.useCss().assert.containsText('#modisterraandaquacombinedvalueaddedaerosolopticaldepth', 'MODIS (Terra and Aqua) Combined Value-Added Aerosol Optical Depth');
+ client
+ .useCss()
+ .assert.containsText(
+ '#modisterraandaquacombinedvalueaddedaerosolopticaldepth',
+ 'MODIS (Terra and Aqua) Combined Value-Added Aerosol Optical Depth'
+ );
});
},
after: function(client) {
diff --git a/e2e/features/layers/options-test.js b/e2e/features/layers/options-test.js
index a1ab4f325..158749609 100644
--- a/e2e/features/layers/options-test.js
+++ b/e2e/features/layers/options-test.js
@@ -5,7 +5,7 @@ const skipTour = require('../../reuseables/skip-tour.js');
const combinedAodSettingsButton =
'#active-MODIS_Combined_Value_Added_AOD .wv-layers-options';
const terraAodSettingsButton = '#active-MODIS_Terra_Aerosol .wv-layers-options';
-const terraAodSettingsDialog = '#wv-options-body-MODIS_Terra_Aerosol';
+const terraAodSettingsDialog = '#layer_options_modal-modis_terra_aerosol';
const thresholdMinLabel = '#wv-layer-options-threshold0 .wv-label-range-min';
const activeBluePaletteCheckbox =
'.wv-palette-selector-row.checked #wv-palette-radio-blue_2';
diff --git a/e2e/reuseables/selectors.js b/e2e/reuseables/selectors.js
index 5712edfcd..1b33962e4 100644
--- a/e2e/reuseables/selectors.js
+++ b/e2e/reuseables/selectors.js
@@ -28,8 +28,8 @@ module.exports = {
// layers
infoButton: '.wv-layers-info',
optionsButton: '.wv-layers-options',
- infoDialog: '[aria-describedby="wv-layers-info-dialog"]',
- optionsDialog: '#wv-layers-options-dialog',
+ infoDialog: '.layer-info-settings-modal',
+ optionsDialog: '.layer-info-settings-modal',
layersSearchField: 'input#layers-search-input',
// layersAll: '#layers-all',
layersAll: '.layers-all-layer',