Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Added tests for simulating a run through of the core features of smart-handoffs.

Stephan Wlodarczyk1e1eb65c11c6
diff --git a/e2e/features/smart-handoff/smart-handoff-test.js b/e2e/features/smart-handoff/smart-handoff-test.js
index 6df902e36..5c7116fa7 100644
--- a/e2e/features/smart-handoff/smart-handoff-test.js
+++ b/e2e/features/smart-handoff/smart-handoff-test.js
@@ -1,157 +1,82 @@
const reuseables = require('../../reuseables/skip-tour.js');
const {
addLayers,
+ allCategoryHeader,
+ layerBrowseList,
+ layersModalCloseButton,
} = require('../../reuseables/selectors.js');
+const TIME_LIMIT = 10000;
+
const layersTab = '#layers-sidebar-tab';
const dataTabButton = '#download-sidebar-tab';
module.exports = {
- 'Data tab is available and in default state when clicked': (client) => {
- reuseables.loadAndSkipTour(client, client.globals.timeout);
+ 'Data tab is available and in default state when clicked': (c) => {
+ reuseables.loadAndSkipTour(c, TIME_LIMIT);
+ c.url(`${c.globals.url}?t=2019-12-01`);
// Verify Data tab is in sidebar
- client.expect.element(dataTabButton).to.be.visible;
+ c.expect.element(dataTabButton).to.be.visible;
// Click Data Download tab to switch to Data with 'No Data Selected'
- client.click(dataTabButton);
- client.expect
+ c.click(dataTabButton);
+ c.expect
.element('.smart-handoff-side-panel > h1')
.to.have.text.equal('None of your currently listed layers are available for downloading.');
},
- 'Select layer with valid conceptId and check that it is available for download': (client) => {
- client.click(layersTab);
- client.click(addLayers);
+ 'Select "Cloud Effective Radius" layer and check that it is available for download': (c) => {
+ // Go to layers tabs
+ c.click(layersTab);
+ c.click(addLayers);
+ c.click(allCategoryHeader);
+
+ // Add specified layer to layer list
+ c.waitForElementVisible(layerBrowseList, TIME_LIMIT, (e) => {
+ c.click('#accordion-legacy-all-cloud-effective-radius');
+ c.waitForElementVisible('#checkbox-case-MODIS_Aqua_Cloud_Effective_Radius', TIME_LIMIT, (e) => {
+ c.click('#checkbox-case-MODIS_Aqua_Cloud_Effective_Radius');
+ c.click(layersModalCloseButton);
+ });
+ });
+
+ // Switch back to download tab
+ c.click(dataTabButton);
+
+ // Ensure layer is now showing as an option for download
+ c.expect
+ .element('.smart-handoff-layer-list > .layer-item > #MODIS_Aqua_Cloud_Effective_Radius')
+ .to.be.present;
+
+ c.click('#MODIS_Aqua_Cloud_Effective_Radius');
+
+ // Verify granules and date are correct
+ c.expect
+ .element('.granule-count > h1')
+ .to.have.text.equal('Available granules for 2019 Dec 01: 128(?)');
},
- after(client) {
- client.end();
+ 'Enable target area selection': (c) => {
+ c.click('#chk-crop-toggle');
+ c.assert.containsText('.granule-count > h1', 'of 128');
+ },
+
+ 'Download via Earthdata Search': (c) => {
+ c.click('.download-btn');
+ c.expect
+ .element('#transferring-to-earthdata-search')
+ .to.be.present;
+
+ // Check that Earthdata Search opens in new tab
+ c.click('#continue-btn').pause(2500);
+ c.windowHandles((tabs) => {
+ c.assert.equal(tabs.value.length, 2);
+ });
},
-};
-// 'No Results - No Data Available indicator displayed when no data': `${function(
-// client,
-// ) {
-// // December 31, 2022 no results
-// const queryString = '?now=2022-12-31T12&p=geographic&l=MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor,MODIS_Terra_Aerosol,Coastlines&t=2022-12-31&v=-91.125,-53.3671875,82.40625,59.8359375&download=MOD04_L2';
-// client.url(client.globals.url + queryString);
-
-// // 'No Data Available' indicator present
-// client.expect
-// .element('#indicator')
-// .to.be.present.after(client.globals.timeout);
-// client.expect
-// .element('#indicator > span')
-// .to.have.text.equal('No Data Available')
-// .after(client.globals.timeout);
-
-// // On Valid Data Select, 'No Data Available' indicator disappears and data layer is in sidebar
-// // Click from year 2022 down to 2013
-// for (let i = 0; i <= 8; i += 1) {
-// client.click(downYearInputButton);
-// }
-// client.expect
-// .element('#indicator')
-// .to.not.be.visible.after(client.globals.timeout);
-// client.expect
-// .element('#wv-data-MOD04_L2MODIS_Terra_Aerosol')
-// .to.be.visible.after(client.globals.timeout);
-
-// // On Valid Data Select, 'No Data Available' indicator appears
-// // Click from year 2013 up to 2022
-// for (let i = 0; i <= 8; i += 1) {
-// client.click(upYearInputButton);
-// }
-// client.expect.element('#indicator').to.be.present;
-// client.expect
-// .element('#indicator > span')
-// .to.have.text.equal('No Data Available')
-// .after(client.globals.timeout);
-
-// // Click layers tab, indicator disappears
-// client.click(layersTab);
-// client.expect.element('#indicator').to.not.be.visible;
-
-// // Click data download tab, 'No Data Available' indicator appears
-// client.click(dataDownloadTabButton);
-// client.expect.element('#indicator').to.be.visible;
-// client.expect
-// .element('#indicator > span')
-// .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,
-// ) {
-// // zoomed in so no data in view
-// const queryString = '?p=geographic&l=MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor,MODIS_Terra_Aerosol,Coastlines&t=2013-08-15&v=-115.09722044197,32.076037619082,-112.11113645759,34.018420431582&download=MOD04_L2';
-// client.url(client.globals.url + queryString);
-
-// // 'Zoom out or move map' indicator present
-// client.expect
-// .element('#indicator')
-// .to.be.present.after(client.globals.timeout);
-// client.expect
-// .element('#indicator > span')
-// .to.have.text.equal('Zoom out or move map')
-// .after(client.globals.timeout);
-
-// // Zoom out three times for a data point granule selection button to be visible and indicator disappears
-// client.click(zoomOutButton);
-// client.pause(750);
-// client.click(zoomOutButton);
-// client.pause(750);
-// client.click(zoomOutButton);
-// client.expect
-// .element('#indicator')
-// .to.not.be.visible.after(client.globals.timeout);
-
-// // Zoom in data point granule selection button is not visible and indicator reappears
-// client.click(zoomInButton);
-// client.pause(750);
-// client.click(zoomInButton);
-// client.pause(750);
-// client.click(zoomInButton);
-// client.expect
-// .element('#indicator')
-// .to.be.visible.after(client.globals.timeout);
-
-// // Click layers tab, indicator disappears
-// client.click(layersTab);
-// client.expect
-// .element('#indicator')
-// .to.not.be.visible.after(client.globals.timeout);
-
-// // Click data download tab, 'No Data Available' indicator appears
-// client.click(dataDownloadTabButton);
-// client.expect.element('#indicator').to.be.visible;
-// client.expect
-// .element('#indicator > span')
-// .to.have.text.equal('Zoom out or move map')
-// .after(client.globals.timeout);
-// },
-// 'Query Timeout - No results received yet dialog box displayed': `${function(
-// client,
-// ) {
-// // query timeout
-// const queryString = '?timeoutCMR=100&p=geographic&l=MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor,MODIS_Terra_Aerosol,Coastlines&t=2013-09-29&v=-170.64093281444,-59.218903407221,20.468442185558,65.093596592779';
-// client.url(client.globals.url + queryString);
-
-// // Click Data Download tab and show 'No results received yet' dialog box
-// client.waitForElementVisible(
-// dataDownloadTabButton,
-// client.globals.timeout,
-// () => {
-// client.click(dataDownloadTabButton);
-// client.expect
-// .element('.wv-dialog')
-// .to.have.text.equal(
-// 'No results received yet. This may be due to a connectivity issue. Please try again later.',
-// )
-// .after(client.globals.timeout);
-// },
-// );
-// }}`,
+ after(c) {
+ c.end();
+ },
+};
diff --git a/web/css/smart-handoff.css b/web/css/smart-handoff.css
index 1055c9aee..3edd3552a 100644
--- a/web/css/smart-handoff.css
+++ b/web/css/smart-handoff.css
@@ -279,12 +279,8 @@ label[for='chk-crop-toggle'] {
}
/** Overrides the modal component styles */
-.transferring-to-earthdata-search.modal-dialog .modal-body {
+#transferring-to-earthdata-search.modal-dialog .modal-body {
background: #191a1b !important;
- border: 1px solid #444 !important;
-}
-.transferring-to-earthdata-search .modal-header {
- border-bottom: 1px solid #444 !important;
}
.constant-width {