Interactive interface for browsing global, full-resolution satellite imagery
Stub Natural Events and Tour tests
Josiah Spraguec708189d9555
diff --git a/e2e/features/events.feature b/e2e/features/events.featurenew file mode 100644index 000000000..a0cbd6ecc--- /dev/null+++ b/e2e/features/events.feature@@ -0,0 +1,17 @@+Feature: Natural Events+ As a user of Worldview+ I want to browse natural events+ So that I can see imagery related to events++Background:+ Given Worldview is in initial state+ And I click "Skip Tour"++Scenario: Selecting Events Tab++ When I click the "events" tab+ Then the tab should have a list of events+ And I should see "Fire"+ And I should see "Iceberg"+ And I should see "Hurricane"+ And I should see "Volcano"diff --git a/e2e/features/google.feature b/e2e/features/google.featuredeleted file mode 100644index 487f18542..000000000--- a/e2e/features/google.feature+++ /dev/null@@ -1,7 +0,0 @@-Feature: Google Search--Scenario: Searching Google-- Given I open Google's search page- Then the title is "Google"- And the Google search form existsdiff --git a/e2e/features/tour.feature b/e2e/features/tour.featurenew file mode 100644index 000000000..23b87d463--- /dev/null+++ b/e2e/features/tour.feature@@ -0,0 +1,12 @@+Feature: Tour+ As a user of Worldview+ I want to take a tour of the app+ So that I can learn how to use Worldview++Background:+ Given Worldview is in initial state+ Then I should see "Take Tour"++ Scenario: Skipping Tour+ When I click "Skip Tour"+ Then I should not see "Take Tour"diff --git a/e2e/step_definitions/app.js b/e2e/step_definitions/app.jsnew file mode 100644index 000000000..da54eaeb2--- /dev/null+++ b/e2e/step_definitions/app.js@@ -0,0 +1,34 @@+const {client} = require('nightwatch-cucumber');+const {defineSupportCode} = require('cucumber');++defineSupportCode(({Given, Then, When}) => {+ Given('Worldview is in initial state', () => {+ return client.url(client.globals.url).waitForElementVisible('body', 1000);+ });++ // Select any element that contains the string+ When('I click {string}', function (string) {+ return client.useXpath().click('//*[contains(text(),"' + string + '")]');+ });++ // Select a link by link text+ When('I click on the {string} link', function (text) {+ return client.useXpath().click('//a[text()="'+ text +'"]');+ });++ // Select a Worldview tab+ When('I click the {string} tab', function(name) {+ return client.useCss().click('[data-tab="' + name + '"]');+ });++ // Check for a string+ Then('I should see {string}', function (text) {+ return client.useCss().assert.containsText('body', text);+ });++ // Check for a string+ Then('I should not see {string}', function (text) {+ return client.useCss().expect.element('body').text.not.contains(text);+ });++});diff --git a/e2e/step_definitions/events.js b/e2e/step_definitions/events.jsnew file mode 100644index 000000000..767937c67--- /dev/null+++ b/e2e/step_definitions/events.js@@ -0,0 +1,11 @@+const {client} = require('nightwatch-cucumber');+const {defineSupportCode} = require('cucumber');++defineSupportCode(({Given, Then, When}) => {++ Then('the tab should have a list of events', function () {+ return client.useCss()+ .waitForElementVisible('#wv-events ul.map-item-list', 3000);+ });++});