Interactive interface for browsing global, full-resolution satellite imagery
fix animation e2e test break #1964
Benjamin King46d6021252ef
diff --git a/e2e/features/animation/animation-test.js b/e2e/features/animation/animation-test.jsindex 616575ff1..cb2945c14 100644--- a/e2e/features/animation/animation-test.js+++ b/e2e/features/animation/animation-test.js@@ -3,30 +3,48 @@ const localSelectors = require('../../reuseables/selectors.js');const localQuerystrings = require('../../reuseables/querystrings.js');const TIME_LIMIT = 10000;module.exports = {- before: function(client) {+ before: function (client) {reuseables.loadAndSkipTour(client, TIME_LIMIT);},/*** Clicking the animation widget button* Opens the widget*/- 'Toggling Animation Mode': function(client) {+ 'Toggling Animation Mode': function (client) {client.expect.element(localSelectors.animationWidget).to.not.be.present;client.useCss().click(localSelectors.animationButton);client.waitForElementVisible(localSelectors.animationWidget, TIME_LIMIT);},+ 'Opening custom interval widget': function (client) {+ client.url(client.globals.url + localQuerystrings.activeAnimationWidget);+ client.waitForElementVisible(+ localSelectors.animationButton,+ TIME_LIMIT,+ function (el) {+ client+ .useCss()+ .moveToElement('.wv-animation-widget-header #timeline-interval-btn-container #current-interval', 1, 1)+ .waitForElementVisible('.wv-animation-widget-header .timeline-interval .interval-years', 2000)+ .click('.wv-animation-widget-header .timeline-interval #interval-custom-static');+ client.pause(1000);+ client.useCss().assert.elementPresent('#wv-animation-widget .custom-interval-widget');+ client.useCss().assert.containsText('.wv-animation-widget-header #current-interval', 'CUSTOM');+ client.useCss().assert.containsText('#timeline #current-interval', 'CUSTOM');+ }+ );+ },/*** Moving the range selector updates the selected range* in the animation widget date selector*/- 'Changing date range of animation': function(client) {+ 'Changing date range of animation': function (client) {client.url(client.globals.url + localQuerystrings.activeAnimationWidget);// Test Permalink opens widgetclient.waitForElementVisible('#day-animation-widget-start',TIME_LIMIT,- function(el) {- client.getValue('#day-animation-widget-start', function(result) {+ function (el) {+ client.getValue('#day-animation-widget-start', function (result) {const startDay = result.value;client.useCss()@@ -39,7 +57,7 @@ module.exports = {.moveToElement('.timeline-dragger', 0, 0).mouseButtonUp(0).pause(2000);- client.getValue('#day-animation-widget-start', function(result) {+ client.getValue('#day-animation-widget-start', function (result) {const newDay = result.value;this.assert.notEqual(startDay, newDay);});@@ -47,18 +65,25 @@ module.exports = {});},+/*** Changing animation time interval*/- 'Changing animation time interval': function(client) {- client.url(client.globals.url + localQuerystrings.activeAnimationWidget);+ 'Changing animation time interval': function (client) {+ // Can't use moveToElement twice with same elements+ // because of selenium catching.+ // Loading a different Url fixed the problem+ // https://github.com/SeleniumHQ/selenium/issues/4724#issuecomment-330862710+ reuseables.loadAndSkipTour(client, TIME_LIMIT);+ client.useCss().click(localSelectors.animationButton);client.waitForElementVisible(localSelectors.animationButton,TIME_LIMIT,- function(el) {+ function (el) {client.useCss().moveToElement('.wv-animation-widget-header #timeline-interval-btn-container #current-interval', 1, 1)+ .waitForElementVisible('.wv-animation-widget-header .timeline-interval .interval-years', 2000).click('.wv-animation-widget-header #timeline-interval #interval-years');client.pause(1000);client.useCss().assert.containsText('.wv-animation-widget-header #current-interval', '1 YEAR');@@ -66,24 +91,7 @@ module.exports = {});},- 'Opening custom interval widget': function(client) {- client.url(client.globals.url + localQuerystrings.activeAnimationWidget);- client.waitForElementVisible(- localSelectors.animationButton,- TIME_LIMIT,- function(el) {- client- .useCss()- .moveToElement('.wv-animation-widget-header #timeline-interval-btn-container #current-interval', 1, 1)- .click('.wv-animation-widget-header #timeline-interval #interval-custom-static');- client.pause(1000);- client.useCss().assert.elementPresent('#wv-animation-widget .custom-interval-widget');- client.useCss().assert.containsText('.wv-animation-widget-header #current-interval', 'CUSTOM');- client.useCss().assert.containsText('#timeline #current-interval', 'CUSTOM');- }- );- },- after: function(client) {+ after: function (client) {client.end();}};