Interactive interface for browsing global, full-resolution satellite imagery
fix image-download e2e zoom viewport #1964
Benjamin King72a5e5513947
diff --git a/e2e/features/image-download/resolutions3413-test.js b/e2e/features/image-download/resolutions3413-test.jsindex 3abdb1912..57547889b 100644--- a/e2e/features/image-download/resolutions3413-test.js+++ b/e2e/features/image-download/resolutions3413-test.js@@ -1,5 +1,6 @@const { zoomIn } = require('../../reuseables/zoom');const { bookmark } = require('../../reuseables/bookmark');+const { normalizeViewport } = require('../../reuseables/normalize-viewport');const {openImageDownloadPanel,@@ -16,11 +17,12 @@ const startParams = [];module.exports = {- after: function(client) {+ after: function (client) {client.end();},- 'In the arctic, top zoom levels is 5km': function(c) {+ 'In the arctic, top zoom levels is 5km': function (c) {+ normalizeViewport(c, 1024, 768)bookmark(c, startParams);openImageDownloadPanel(c);c.expect.element('#wv-image-resolution option[value="20"]')@@ -28,7 +30,7 @@ module.exports = {closeImageDownloadPanel(c);},- 'Next two zooms are 1km': function(c) {+ 'Next two zooms are 1km': function (c) {zoomIn(c, 'arctic');openImageDownloadPanel(c);c.expect.element('#wv-image-resolution option[value="4"]')@@ -41,7 +43,7 @@ module.exports = {closeImageDownloadPanel(c);},- 'Next zoom is 500m': function(c) {+ 'Next zoom is 500m': function (c) {zoomIn(c, 'arctic');openImageDownloadPanel(c);c.expect.element('#wv-image-resolution option[value="2"]')@@ -49,7 +51,7 @@ module.exports = {closeImageDownloadPanel(c);},- 'Next zoom is 250m': function(c) {+ 'Next zoom is 250m': function (c) {zoomIn(c, 'arctic');openImageDownloadPanel(c);c.expect.element('#wv-image-resolution option[value="1"]')@@ -62,7 +64,7 @@ module.exports = {closeImageDownloadPanel(c);},- 'Last zoom level is 250m': function(c) {+ 'Last zoom level is 250m': function (c) {// mash the zoom button a bunch of times and see if it changesfor (let i = 0; i < 5; i++) {zoomIn(c, 'arctic');@@ -73,7 +75,7 @@ module.exports = {closeImageDownloadPanel(c);},- 'Click download': function(c) {+ 'Click download': function (c) {openImageDownloadPanel(c);clickDownload(c);c.getAttribute('#wv-image-download-url', 'url', (result) => {diff --git a/e2e/features/image-download/resolutions4326-test.js b/e2e/features/image-download/resolutions4326-test.jsindex a5b80caa8..facfb4cbc 100644--- a/e2e/features/image-download/resolutions4326-test.js+++ b/e2e/features/image-download/resolutions4326-test.js@@ -1,7 +1,6 @@const { zoomIn } = require('../../reuseables/zoom');const { bookmark } = require('../../reuseables/bookmark');-const { loadAndSkipTour } = require('../../reuseables/skip-tour');-const TIME_LIMIT = 10000;+const { normalizeViewport } = require('../../reuseables/normalize-viewport');const {openImageDownloadPanel,closeImageDownloadPanel,@@ -20,11 +19,9 @@ module.exports = {after: function (client) {client.end();},- before: function (client) {- loadAndSkipTour(client, TIME_LIMIT);- },'In geographic, top two zoom levels are 10km': function (c) {+ normalizeViewport(c, 1024, 768)bookmark(c, startParams);openImageDownloadPanel(c);c.expect.element('#wv-image-resolution option[value="40"]').to.be.selected;