Interactive interface for browsing global, full-resolution satellite imagery
e2e cleanup
ZachTRice31108e49bd96
diff --git a/e2e/features/animation/gif-test.js b/e2e/features/animation/gif-test.jsindex ca927c225..dc8939479 100644--- a/e2e/features/animation/gif-test.js+++ b/e2e/features/animation/gif-test.js@@ -13,38 +13,39 @@ module.exports = {reuseables.loadAndSkipTour(client, TIME_LIMIT)},// TODO: Fix FireFox and Chrome test- // 'Downloading GIF when custom colormap is activated': function (client) {- // if (client.options.desiredCapabilities.browserName !== 'ie') {- // // Custom colormaps down exist in IE- // client.url(client.globals.url + localQueryStrings.activeCustomColormap)- // client.waitForElementVisible(- // localSelectors.animationWidget,- // TIME_LIMIT,- // () => {- // client.click(localSelectors.createGifIcon).pause(2000)- // client.expect.element(askDialog).to.be.present- // client- // .useCss()- // .click(paletteDialogOkButton)- // .pause(2000)- // client.click(localSelectors.createGifButton).pause(2000)- // client.waitForElementVisible(- // localSelectors.gifResults,- // TIME_LIMIT,- // () => {- // client.click(client.globals.selectors.modalCloseButton)- // client.expect.element(localSelectors.gifResults).to.not.be- // .present- // client.waitForElementVisible(- // localSelectors.animationWidget,- // TIME_LIMIT- // )- // }- // )- // }- // )- // }- // },+ 'Downloading GIF when custom colormap is activated': function (client) {+ if (client.options.desiredCapabilities.browserName !== 'ie' &&+ client.options.desiredCapabilities.browserName !== 'chrome') {+ // Custom colormaps down exist in IE+ client.url(client.globals.url + localQueryStrings.activeCustomColormap)+ client.waitForElementVisible(+ localSelectors.animationWidget,+ TIME_LIMIT,+ () => {+ client.click(localSelectors.createGifIcon).pause(2000)+ client.expect.element(askDialog).to.be.present+ client+ .useCss()+ .click(paletteDialogOkButton)+ .pause(2000)+ client.click(localSelectors.createGifButton).pause(2000)+ client.waitForElementVisible(+ localSelectors.gifResults,+ TIME_LIMIT,+ () => {+ client.click(client.globals.selectors.modalCloseButton)+ client.expect.element(localSelectors.gifResults).to.not.be+ .present+ client.waitForElementVisible(+ localSelectors.animationWidget,+ TIME_LIMIT+ )+ }+ )+ }+ )+ }+ },'Downloading GIF when polar projection is rotated': function (client) {client.url(client.globals.url + localQueryStrings.animationProjectionRotateddiff --git a/e2e/features/layers/layers-sidebar-test.js b/e2e/features/layers/layers-sidebar-test.jsindex 9e6ea29be..5cfe0b802 100644--- a/e2e/features/layers/layers-sidebar-test.js+++ b/e2e/features/layers/layers-sidebar-test.js@@ -27,9 +27,9 @@ const {groupRemove,layerHidden,layerVisible,- sidebarContainer- // groupedOverlaysAllLayers- // firesGroupHeader+ sidebarContainer,+ groupedOverlaysAllLayers,+ firesGroupHeader} = require('../../reuseables/selectors.js')const vectorsQueryString = '?v=-70.43215000968726,28.678203599725197,-59.81569241792232,31.62330063930118&l=GRanD_Dams,Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor'@@ -51,14 +51,13 @@ const groupedLayerIdOrder = ['active-MODIS_Combined_Value_Added_AOD','active-MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth']--// const ungroupedReorderdLayerIdOrder = [-// 'active-MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth',-// 'active-MODIS_Combined_Value_Added_AOD',-// 'active-Reference_Features_15m',-// 'active-VIIRS_SNPP_Thermal_Anomalies_375m_All',-// 'active-VIIRS_NOAA20_Thermal_Anomalies_375m_All'-// ]+const ungroupedReorderdLayerIdOrder = [+ 'active-MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth',+ 'active-MODIS_Combined_Value_Added_AOD',+ 'active-Reference_Features_15m',+ 'active-VIIRS_SNPP_Thermal_Anomalies_375m_All',+ 'active-VIIRS_NOAA20_Thermal_Anomalies_375m_All'+]module.exports = {before: (c) => {@@ -199,54 +198,58 @@ module.exports = {c.expect.elements(`${baselayersGroup} ul > li`).count.to.equal(0)},// TODO: Fix macOS Chrome test- // 'Re-ordering groups, then disabling groups keeps individual layer order': (c) => {- // if (c.options.desiredCapabilities.browserName === 'firefox') {- // return- // }- // c.url(c.globals.url + twoGroupsQueryString)- // c.waitForElementVisible(aodGroup, TIME_LIMIT)- // c.perform(function () {- // const actions = this.actions({ async: true })- // const layerGroupHeader = c.findElement(aodGroupHeader)- // const firesHeader = c.findElement(firesGroupHeader)- // c.pause(500)- // return actions- // .click(layerGroupHeader)- // .pause(300)- // .press()- // .pause(300)- // .move({- // origin: layerGroupHeader,- // x: 50,- // y: 0- // })- // .pause(300)- // .move({- // origin: firesHeader,- // x: 0,- // y: 50- // })- // .pause(300)- // .release()- // .pause(300)- // })- // c.click(groupCheckbox)- // c.pause(500)- // checkElementOrdering(c, `${overlaysGroup} ul > li`, ungroupedReorderdLayerIdOrder)- // },+ 'Re-ordering groups, then disabling groups keeps individual layer order': (c) => {+ if (c.options.desiredCapabilities.browserName === 'firefox' ||+ c.options.desiredCapabilities.browserName === 'chrome') {+ return+ }+ c.url(c.globals.url + twoGroupsQueryString)+ c.waitForElementVisible(aodGroup, TIME_LIMIT)+ c.perform(function () {+ const actions = this.actions({ async: true })+ const layerGroupHeader = c.findElement(aodGroupHeader)+ const firesHeader = c.findElement(firesGroupHeader)+ c.pause(500)+ return actions+ .click(layerGroupHeader)+ .pause(300)+ .press()+ .pause(300)+ .move({+ origin: layerGroupHeader,+ x: 50,+ y: 0+ })+ .pause(300)+ .move({+ origin: firesHeader,+ x: 0,+ y: 50+ })+ .pause(300)+ .release()+ .pause(300)+ })+ c.click(groupCheckbox)+ c.pause(500)+ checkElementOrdering(c, `${overlaysGroup} ul > li`, ungroupedReorderdLayerIdOrder)+ },// begin with "mixed" interspersed layers- // 'Enabling groups re-orders layers into their groups': (c) => {- // c.url(c.globals.url + mixedLayersGroupsDisabledQueryString)- // c.waitForElementVisible(sidebarContainer, TIME_LIMIT)- // // confirm mixed layer ordering- // checkElementOrdering(c, `${overlaysGroup} ul > li`, mixedLayerIdOrder)- // c.click(groupCheckbox).pause(200)- // c.expect.element(aodGroup).to.be.present- // c.expect.element(firesGroup).to.be.present- // // confirm layers ordered by their groups- // checkElementOrdering(c, groupedOverlaysAllLayers, groupedLayerIdOrder)- // },+ 'Enabling groups re-orders layers into their groups': (c) => {+ if (c.options.desiredCapabilities.browserName === 'chrome') {+ return+ }+ c.url(c.globals.url + mixedLayersGroupsDisabledQueryString)+ c.waitForElementVisible(sidebarContainer, TIME_LIMIT)+ // confirm mixed layer ordering+ checkElementOrdering(c, `${overlaysGroup} ul > li`, mixedLayerIdOrder)+ c.click(groupCheckbox).pause(200)+ c.expect.element(aodGroup).to.be.present+ c.expect.element(firesGroup).to.be.present+ // confirm layers ordered by their groups+ checkElementOrdering(c, groupedOverlaysAllLayers, groupedLayerIdOrder)+ },'Immediately disabling groups restores mixed ordering': (c) => {c.click(groupCheckbox).pause(200)@@ -257,6 +260,9 @@ module.exports = {},'Making a change to grouped layers causes group ordering to be retained when ungrouped': (c) => {+ if (c.options.desiredCapabilities.browserName === 'chrome') { // right click doesn't work in firefox+ return+ }c.url(c.globals.url + mixedLayersGroupsDisabledQueryString)// Turn on groupsc.click(groupCheckbox).pause(200)diff --git a/e2e/features/measure/measure-test.js b/e2e/features/measure/measure-test.jsindex c946a6925..e3b9bab83 100644--- a/e2e/features/measure/measure-test.js+++ b/e2e/features/measure/measure-test.js@@ -8,13 +8,13 @@ const {measureBtn,measureAreaBtn,measureDistanceBtn,- // clearMeasurementsBtn,+ clearMeasurementsBtn,measureMenu,- // measurementTooltip,+ measurementTooltip,geoMeasurementTooltip,arcticMeasurementTooltip,sidebarContainer,- // unitOfMeasureToggle,+ unitOfMeasureToggle,downloadGeojsonBtn// downloadShapefileBtn,} = localSelectors@@ -164,17 +164,18 @@ module.exports = {c.waitForElementVisible(arcticMeasurementTooltip, TIME_LIMIT)c.expect.elements(arcticMeasurementTooltip).count.to.equal(2)},- // 'Clearing a measurements removes all tooltips in this projection only': (c) => {- // if (c.options.desiredCapabilities.browserName === 'firefox') { // c.elements() returns different values for firefox- // return- // }- // c.useCss().click(measureBtn)- // c.waitForElementVisible(measureMenu, TIME_LIMIT, (el) => {- // c.useCss().click(clearMeasurementsBtn)- // c.expect.elements(arcticMeasurementTooltip).count.to.equal(0)- // c.expect.elements(geoMeasurementTooltip).count.to.equal(3)- // })- // },+ 'Clearing a measurements removes all tooltips in this projection only': (c) => {+ if (c.options.desiredCapabilities.browserName === 'firefox' ||+ c.options.desiredCapabilities.browserName === 'chrome') {+ return+ }+ c.useCss().click(measureBtn)+ c.waitForElementVisible(measureMenu, TIME_LIMIT, (el) => {+ c.useCss().click(clearMeasurementsBtn)+ c.expect.elements(arcticMeasurementTooltip).count.to.equal(0)+ c.expect.elements(geoMeasurementTooltip).count.to.equal(3)+ })+ },'Switching back to geographic projection, three measurements show again': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') { // c.elements() returns different values for firefoxreturn@@ -183,30 +184,32 @@ module.exports = {c.expect.elements(geoMeasurementTooltip).count.to.equal(3)},// TODO: Fix macOS chrome test- // 'Toggling unit of measure updates the measurement value': async (c) => {- // if (c.options.desiredCapabilities.browserName === 'firefox') { // c.elements() returns different values for firefox- // return- // }- // c.click(measureBtn)- // await c.waitForElementVisible(measureMenu, TIME_LIMIT)- // await c.click(unitOfMeasureToggle)- // c.pause(500)- // const tooltips = await c.elements('css selector', measurementTooltip)- // tooltips.forEach((element) => {- // c.elementIdText(element.ELEMENT, (elResult) => {- // const pass = elResult.value.includes('mi')- // c.assert.ok(pass)- // })- // })- // },- // 'Clearing a measurements removes all tooltips': (c) => {- // if (c.options.desiredCapabilities.browserName === 'firefox') { // c.elements() returns different values for firefox- // return- // }- // c.waitForElementVisible(measureMenu)- // c.useCss().click(clearMeasurementsBtn)- // c.expect.elements(measurementTooltip).count.to.equal(0)- // },+ 'Toggling unit of measure updates the measurement value': async (c) => {+ if (c.options.desiredCapabilities.browserName === 'firefox' ||+ c.options.desiredCapabilities.browserName === 'chrome') {+ return+ }+ c.click(measureBtn)+ await c.waitForElementVisible(measureMenu, TIME_LIMIT)+ await c.click(unitOfMeasureToggle)+ c.pause(500)+ const tooltips = await c.elements('css selector', measurementTooltip)+ tooltips.forEach((element) => {+ c.elementIdText(element.ELEMENT, (elResult) => {+ const pass = elResult.value.includes('mi')+ c.assert.ok(pass)+ })+ })+ },+ 'Clearing a measurements removes all tooltips': (c) => {+ if (c.options.desiredCapabilities.browserName === 'firefox' ||+ c.options.desiredCapabilities.browserName === 'chrome') {+ return+ }+ c.waitForElementVisible(measureMenu)+ c.useCss().click(clearMeasurementsBtn)+ c.expect.elements(measurementTooltip).count.to.equal(0)+ },after (c) {c.end()}