Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix e2e tests

Edward Platob3a2a063150f
diff --git a/e2e/features/measure/measure-test.js b/e2e/features/measure/measure-test.js
index c83299973..bb7664246 100644
--- a/e2e/features/measure/measure-test.js
+++ b/e2e/features/measure/measure-test.js
@@ -23,6 +23,7 @@ module.exports = {
client.expect.element(measureMenu).to.not.be.present;
client.useCss().click(measureBtn);
client.waitForElementVisible(measureMenu, TIME_LIMIT);
+ client.pause(300);
},
'Initiating a measurement causes an alert to show and sidebar to collapse': function(client) {
client.useCss().click(measureDistanceBtn);
@@ -32,15 +33,20 @@ module.exports = {
sidebarContainer,
'max-height',
'0px');
+ client.pause(300);
},
'Cancelling a measurement causes an alert to disappear and sidebar to expand': function(client) {
if (client.options.desiredCapabilities.browserName !== 'firefox') { // right click doesn't work in firefox
client.useCss().click(measureBtn);
client.waitForElementVisible(measureMenu, TIME_LIMIT, (el) => {
+ client.waitForElementVisible(measureDistanceBtn, TIME_LIMIT);
+ client.click(measureDistanceBtn);
client.pause(300);
- client.moveToElement('#wv-map-geographic', 300, 110)
- .mouseButtonDown(2)
- .mouseButtonUp(2);
+ client.moveToElement('#wv-map-geographic', 400, 110)
+ .mouseButtonClick(0)
+ .moveTo(null, 400, 210)
+ .mouseButtonClick(2)
+ .mouseButtonClick(0);
client.pause(300);
client.expect.element('#measurement-alert').to.not.be.present;
client.expect.element(sidebarContainer)
@@ -70,10 +76,13 @@ module.exports = {
client.useCss().click(measureAreaBtn);
client.moveTo(null, -250, 10);
client.mouseButtonClick(0);
+ client.pause(200);
client.moveTo(null, 0, 100);
client.mouseButtonClick(0);
+ client.pause(200);
client.moveTo(null, 100, 0);
client.mouseButtonClick(0);
+ client.pause(200);
client.moveTo(null, 0, -100);
client.mouseButtonClick(0);
client.mouseButtonClick(0);
diff --git a/e2e/reuseables/image-download.js b/e2e/reuseables/image-download.js
index a883ac642..1493d61f7 100644
--- a/e2e/reuseables/image-download.js
+++ b/e2e/reuseables/image-download.js
@@ -2,18 +2,23 @@ const TIME_LIMIT = 10000;
module.exports = {
openImageDownloadPanel: function(c) {
+ c.waitForElementNotPresent('.modal fade', TIME_LIMIT);
c.waitForElementVisible('#wv-image-button', TIME_LIMIT);
c.click('#wv-image-button');
- c.pause(250);
+ c.pause(550);
},
closeImageDownloadPanel: function(c) {
+ c.waitForElementVisible('#toolbar_snapshot .close', TIME_LIMIT);
c.click('#toolbar_snapshot .close');
c.waitForElementNotPresent('#toolbar_snapshot', TIME_LIMIT);
- c.pause(250);
+ c.pause(550);
},
clickDownload: function(c) {
- c.click(' .wv-image-button .wv-button');
+ c.waitForElementNotPresent('.modal fade', TIME_LIMIT);
+ c.waitForElementVisible('.wv-image-button', TIME_LIMIT);
+ c.click('.wv-image-button');
+ c.pause(550);
}
};