Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

update e2e tests

Jason Kent0944e85fa3a1
diff --git a/e2e/features/measure/measure-test.js b/e2e/features/measure/measure-test.js
index df09490de..26e84a8bc 100644
--- a/e2e/features/measure/measure-test.js
+++ b/e2e/features/measure/measure-test.js
@@ -15,6 +15,8 @@ const {
arcticMeasurementTooltip,
sidebarContainer,
unitOfMeasureToggle,
+ downloadGeojsonBtn,
+ downloadShapefileBtn,
} = localSelectors;
function createDistanceMeasurement(c, [startX, startY], [endX, endY]) {
@@ -104,6 +106,12 @@ module.exports = {
c.expect.elements(geoMeasurementTooltip).count.to.equal(3);
});
},
+ 'Download as GeoJSON and Shapefile options available in menu': (c) => {
+ c.click(measureBtn);
+ c.waitForElementVisible(downloadGeojsonBtn);
+ c.waitForElementVisible(downloadShapefileBtn);
+ c.click('.modal');
+ },
'Switching to arctic projection, no measurements show': (c) => {
if (c.options.desiredCapabilities.browserName === 'firefox') {
return;
@@ -111,6 +119,12 @@ module.exports = {
switchProjection(c, 'arctic');
c.expect.elements(arcticMeasurementTooltip).count.to.equal(0);
},
+ 'Download as GeoJSON and Shapefile options NOT available in menu': (c) => {
+ c.click(measureBtn);
+ c.expect.element(downloadGeojsonBtn).to.not.be.present;
+ c.expect.element(downloadShapefileBtn).to.not.be.present;
+ c.click('.modal');
+ },
'Creating measurements in arctic projection causes tooltips to show': (c) => {
if (c.options.desiredCapabilities.browserName === 'firefox') {
return;
diff --git a/e2e/reuseables/selectors.js b/e2e/reuseables/selectors.js
index 677275177..7fcfbef19 100644
--- a/e2e/reuseables/selectors.js
+++ b/e2e/reuseables/selectors.js
@@ -36,6 +36,8 @@ module.exports = {
measurementTooltip: '.tooltip-measure',
geoMeasurementTooltip: '#wv-map-geographic .tooltip-measure',
arcticMeasurementTooltip: '#wv-map-arctic .tooltip-measure',
+ downloadGeojsonBtn: '#download-geojson-button',
+ downloadShapefileBtn: '#download-shapefiles-button',
// timeline
dragger: '.timeline-dragger',