Interactive interface for browsing global, full-resolution satellite imagery
add info e2e
Ed Plato0d22c7f31c6c
diff --git a/e2e/features/ui/info-mobile-test.js b/e2e/features/ui/info-mobile-test.jsnew file mode 100644index 000000000..81eaeb3fe--- /dev/null+++ b/e2e/features/ui/info-mobile-test.js@@ -0,0 +1,68 @@+const reuseables = require('../../reuseables/skip-tour.js');+const localSelectors = require('../../reuseables/selectors.js');++const TIME_LIMIT = 5000;++module.exports = {+ beforeEach: (client) => {+ reuseables.loadAndSkipTour(client, TIME_LIMIT);+ client.resizeWindow(375, 667); // iPhone 6/7/8 dimensions+ },++ // verify mobile info toolbar is visible and contains valid mobile menu items+ 'Mobile info toolbar is visible and contains valid mobile menu items': (client) => {+ client.expect.element(localSelectors.uiInfoButton).to.be.present;+ client.pause(500);+ client.click(localSelectors.uiInfoButton);++ client.waitForElementVisible('#toolbar_info', TIME_LIMIT);+ client.expect.element('#send_feedback_info_item').to.be.present;+ client.expect.element('#source_code_info_item').to.be.present;+ client.expect.element('#whats_new_info_item').to.be.present;+ client.expect.element('#about_info_item').to.be.present;+ },++ // verify mobile about menu item opens separate tab or window+ 'Mobile about menu item opens separate tab or window': (client) => {+ client.pause(1000);+ client.waitForElementVisible(localSelectors.uiInfoButton, TIME_LIMIT);+ client.click(localSelectors.uiInfoButton);+ client.waitForElementVisible('#toolbar_info', TIME_LIMIT);++ client.windowHandles((tabs) => {+ client.assert.equal(tabs.value.length, 1);+ });++ client.waitForElementVisible('#about_info_item', TIME_LIMIT);+ client.click('#about_info_item');+ client.pause(1000);++ client.windowHandles((tabs) => {+ client.assert.equal(tabs.value.length, 2);+ });+ },++ // verify mobile source code menu item opens separate tab or window+ 'Mobile source code menu item opens separate tab or window': (client) => {+ client.pause(1000);+ client.waitForElementVisible(localSelectors.uiInfoButton, TIME_LIMIT);+ client.click(localSelectors.uiInfoButton);+ client.waitForElementVisible('#toolbar_info', TIME_LIMIT);++ client.windowHandles((tabs) => {+ client.assert.equal(tabs.value.length, 1);+ });++ client.waitForElementVisible('#source_code_info_item', TIME_LIMIT);+ client.click('#source_code_info_item');+ client.pause(1000);++ client.windowHandles((tabs) => {+ client.assert.equal(tabs.value.length, 2);+ });+ },++ afterEach: (client) => {+ client.end();+ },+};diff --git a/e2e/features/ui/info-test.js b/e2e/features/ui/info-test.jsnew file mode 100644index 000000000..31f4bfd21--- /dev/null+++ b/e2e/features/ui/info-test.js@@ -0,0 +1,39 @@+const reuseables = require('../../reuseables/skip-tour.js');+const localSelectors = require('../../reuseables/selectors.js');++const TIME_LIMIT = 5000;++module.exports = {+ before: (client) => {+ reuseables.loadAndSkipTour(client, TIME_LIMIT);+ },++ // verify info toolbar is visible and contains valid menu items+ 'Info toolbar is visible and contains valid menu items': (client) => {+ client.expect.element(localSelectors.uiInfoButton).to.be.present;+ client.click(localSelectors.uiInfoButton);++ client.waitForElementVisible('#toolbar_info', TIME_LIMIT);+ client.expect.element('#send_feedback_info_item').to.be.present;+ client.expect.element('#start_tour_info_item').to.be.present;+ client.expect.element('#source_code_info_item').to.be.present;+ client.expect.element('#whats_new_info_item').to.be.present;+ client.expect.element('#about_info_item').to.be.present;+ client.expect.element('#distraction_free_info_item').to.be.present;+ },++ // verify about menu item opens about modal+ 'About menu item opens about modal': (client) => {+ client.waitForElementVisible('#toolbar_info', TIME_LIMIT);+ client.waitForElementVisible('#about_info_item', TIME_LIMIT);+ client.click('#about_info_item');+ client.pause(500);++ client.expect.element('.modalaboutpage').to.be.present;+ client.expect.element('a[href="mailto:[email protected]"]').to.be.visible;+ },++ after: (client) => {+ client.end();+ },+};diff --git a/e2e/reuseables/selectors.js b/e2e/reuseables/selectors.jsindex 8d7fb4196..b34257398 100644--- a/e2e/reuseables/selectors.js+++ b/e2e/reuseables/selectors.js@@ -46,4 +46,7 @@ module.exports = {addLayers: '#layers-add',layersModalCloseButton: '.custom-layer-dialog .modal-header .close',aerosolOpticalDepth: '#legacy-all #layer-category-item-legacy-all-aerosol-optical-depth',++ // ui+ uiInfoButton: '#wv-info-button',};