Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix e2e tests

Jason Kent76c4da38cf54
diff --git a/e2e/features/compare/compare-test.js b/e2e/features/compare/compare-test.js
index a0c34d170..b3ffb8bc1 100644
--- a/e2e/features/compare/compare-test.js
+++ b/e2e/features/compare/compare-test.js
@@ -82,7 +82,7 @@ module.exports = {
client.click('#closeactiveMODIS_Terra_CorrectedReflectance_TrueColor');
client.pause(100);
client.expect.element(ModisTruecolorLayerA).to.not.be.present;
- client.expect.element(ModisTruecolorLayerB).to.not.be.visible;
+ client.expect.element(ModisTruecolorLayerB).to.not.be.present;
client.click(localSelectors.bTab);
client.waitForElementVisible(ModisTruecolorLayerB, TIME_LIMIT);
},
diff --git a/e2e/features/compare/layer-picker-test.js b/e2e/features/compare/layer-picker-test.js
index 386654406..7402f2f10 100644
--- a/e2e/features/compare/layer-picker-test.js
+++ b/e2e/features/compare/layer-picker-test.js
@@ -43,7 +43,7 @@ module.exports = {
client.waitForElementVisible('#activeB-Coastlines', client.globals.timeout);
},
'Verify that AOD layer is not visible': function(client) {
- client.expect.element('#active-' + aodCombinedValueId).to.not.be.visible;
+ client.expect.element('#active-' + aodCombinedValueId).to.not.be.present;
},
'Add AOD index layer to Active state B and verify it has been added': function(
client
@@ -65,9 +65,7 @@ module.exports = {
client.expect.element(
'#activeB-' + aodCombinedValueId
).to.not.be.present;
- client.expect.element(
- '#active-' + aodCombinedValueId
- ).to.not.be.visible;
+ client.expect.element('#active-' + aodCombinedValueId).to.not.be.present;
});
}
);
@@ -82,7 +80,7 @@ module.exports = {
'#active-' + aodCombinedValueId,
client.globals.timeout,
function() {
- client.expect.element('#activeB-OMI_Aerosol_Index').to.not.be.visible;
+ client.expect.element('#activeB-OMI_Aerosol_Index').to.not.be.present;
client.expect.element('#activeA-OMI_Aerosol_Index').to.not.be.present;
}
);
diff --git a/e2e/features/data-download/data-download-test.js b/e2e/features/data-download/data-download-test.js
index 5768daab0..72dec3869 100644
--- a/e2e/features/data-download/data-download-test.js
+++ b/e2e/features/data-download/data-download-test.js
@@ -11,7 +11,7 @@ const upYearInputButton =
'#date-selector-main > div > div.input-wrapper.input-wrapper-year > div.date-arrows.date-arrow-up';
module.exports = {
- 'Initial State - Data Download tab is available and in default state when clicked': function(
+ 'Initial State - Data Download tab is available and in default state when clicked': '' + function(
client
) {
reuseables.loadAndSkipTour(client, client.globals.timeout);
@@ -34,7 +34,8 @@ module.exports = {
client.expect.element('#indicator').to.be.present;
client.useCss().assert.containsText('#indicator span', 'No Data Available');
},
- 'No Results - No Data Available indicator displayed when no data': function(
+
+ 'No Results - No Data Available indicator displayed when no data': '' + function(
client
) {
// December 31, 2022 no results
@@ -86,6 +87,7 @@ module.exports = {
.to.have.text.equal('No Data Available')
.after(client.globals.timeout);
},
+
'No data in view - Zoom out or move map indicator displayed when no data in view': function(
client
) {
@@ -131,7 +133,7 @@ module.exports = {
.to.have.text.equal('Zoom out or move map')
.after(client.globals.timeout);
},
- 'Query Timeout - No results received yet dialog box displayed': function(
+ 'Query Timeout - No results received yet dialog box displayed': '' + function(
client
) {
// query timeout
diff --git a/e2e/features/events/events-test.js b/e2e/features/events/events-test.js
index d23771338..b0f28f549 100644
--- a/e2e/features/events/events-test.js
+++ b/e2e/features/events/events-test.js
@@ -13,6 +13,7 @@ const selectedMarker = '.marker-selected';
const firstExternalEventLink =
'#wv-events ul.map-item-list .item:first-child .natural-event-link:first-child';
const trackMarker = '.track-marker';
+const layersTab = '#layers-sidebar-tab';
module.exports = {
before: function(client) {
@@ -41,6 +42,7 @@ module.exports = {
client.click('#sidebar-event-EONET_3931');
},
'Check that 4 fire layers are now present': function(client) {
+ client.click(layersTab);
client.waitForElementPresent(
'#active-VIIRS_SNPP_Thermal_Anomalies_375m_Night',
TIME_LIMIT,
diff --git a/e2e/features/events/list-all-test.js b/e2e/features/events/list-all-test.js
index dc9d633d2..32659a335 100644
--- a/e2e/features/events/list-all-test.js
+++ b/e2e/features/events/list-all-test.js
@@ -1,6 +1,9 @@
const reuseables = require('../../reuseables/skip-tour.js');
const localQuerystrings = require('../../reuseables/querystrings.js');
const TIME_LIMIT = 10000;
+const layersTab = '#layers-sidebar-tab';
+const eventsTab = '#events-sidebar-tab';
+
module.exports = {
before: function(client) {
reuseables.loadAndSkipTour(client, TIME_LIMIT);
@@ -12,18 +15,17 @@ module.exports = {
TIME_LIMIT,
function() {
client.click('#sidebar-event-EONET_3931');
+ client.click(layersTab);
client.waitForElementPresent(
'#active-VIIRS_SNPP_Thermal_Anomalies_375m_Night',
TIME_LIMIT,
function() {
+ client.click(eventsTab);
client.expect.element('#sidebar-event-EONET_2703').to.be.visible;
- client.expect.element('ul#wv-eventscontent > li:nth-child(9)').to.be
- .visible;
+ client.expect.element('ul#wv-eventscontent > li:nth-child(9)').to.be.visible;
client.click('#events-footer-checkbox').pause(1000);
- client.expect.element('#sidebar-event-EONET_2703').to.not.be
- .visible;
- client.expect.element('ul#wv-eventscontent > li:nth-child(2)').to
- .not.be.visible;
+ client.expect.element('#sidebar-event-EONET_2703').to.not.be.visible;
+ client.expect.element('ul#wv-eventscontent > li:nth-child(2)').to.not.be.visible;
}
);
}