Interactive interface for browsing global, full-resolution satellite imagery
Add tour e2e test
ZachTRice87f7fecb6c1d
diff --git a/e2e/features/tour/tour-test.js b/e2e/features/tour/tour-test.jsindex de330a438..86ee640b8 100644--- a/e2e/features/tour/tour-test.js+++ b/e2e/features/tour/tour-test.js@@ -1,18 +1,33 @@-// const normalizeViewport = require('../../reuseables/normalize-viewport.js').normalizeViewport;-// const TIME_LIMIT = 10000;+const normalizeViewport = require('../../reuseables/normalize-viewport.js').normalizeViewport;+const TIME_LIMIT = 10000;module.exports = {- // before: function(client) {- // normalizeViewport(client, 1000, 850);- // client.url(client.globals.url);- // },- // 'Verify that the tour is present when the page is loaded': function(client) {- // client.waitForElementVisible('#skipTour', TIME_LIMIT, function() {- // client.click('#takeTour');- // client.waitForElementVisible('.joyride-next-tip', 1000);- // });- // },- // after: function(client) {- // client.end();- // }+ before: function(client) {+ normalizeViewport(client, 1000, 850);+ client.url(client.globals.url)+ .execute(function() {+ return !(window.localStorage.getItem('hideTour'));+ });+ },+ 'Verify that all tour modals are present when the page is loaded': function(client) {+ var totalSteps;+ client.waitForElementVisible('.tour-start', TIME_LIMIT, function() {+ client.click('.tour-box:first-child');+ client.waitForElementVisible('.tour-in-progress .step-total', 2000, function() {+ client.getText('.tour-in-progress .step-total', function(result) { totalSteps = parseInt(result.value); })+ .perform(function() {+ for (let i = 0; i < totalSteps; i++) {+ client.pause(500);+ client.click('.step-container .step-next');+ }+ }).waitForElementVisible('.tour-complete button.close', 2000, function() {+ client.click('.tour-complete button.close');+ });+ });+ });+ },++ after: function(client) {+ client.end();+ }};