Interactive interface for browsing global, full-resolution satellite imagery
Split server and web eslint, apply server eslint rules, remove rpm & htaccess file
ZachTRicedece827cdfe3
diff --git a/.eslintignore b/.eslintignoreindex 0ec5281d2..b7dc74bca 100644--- a/.eslintignore+++ b/.eslintignore@@ -13,4 +13,3 @@ test/*/tasks/temp/*web/js/lib/*e2e/reports/*-# tasks/*diff --git a/.eslintrc b/.eslintrcindex e091b2e36..fac57a149 100644--- a/.eslintrc+++ b/.eslintrc@@ -1,166 +1,22 @@{- "env": {- "browser": true,- "node": true,- "jest/globals": true- },- "parserOptions": {- "ecmaVersion": "latest",- "sourceType": "module",- "ecmaFeatures": {- "jsx": true- }- },- "plugins": [- "react",- "jest",- "no-storage"- ],- "extends": "airbnb",- "parser": "@babel/eslint-parser",- "settings": {- "react": {- "version": "detect"- },- "import/resolver": {- "node": {}, // Needed for node core modules (https://github.com/benmosher/eslint-plugin-import/issues/1396)- "webpack": {}- }- },+ "extends": ["standard", "plugin:n/recommended"],"rules": {- // The following rules are cases where our base rules- // differed from AirBnB Style guide. Keeping for now.- "no-unused-vars": [- "error",- {- "vars": "all",- "args": "none"- }- ],- "camelcase": [- "error",- {- "allow": [- "^UNSAFE_"- ],- "properties": "never"- }- ],- "no-useless-call": "error",- "no-extra-parens": "error",- "space-before-function-paren": "off",- "import/extensions": "off",- "no-multiple-empty-lines": "off",- "import/no-extraneous-dependencies": [- "error",- {- "devDependencies": [- "tasks/*.js",- "tasks/**/*.js",- "rpm/*.js",- "**/*test.js",- "**/*config.js",- "**/*conf.js"- ]- }- ],- "no-storage/no-browser-storage": "error"+ "new-cap": ["error", {}],+ "camelcase": ["error", {+ "ignoreDestructuring": true,+ "properties": "never"+ }],+ "n/no-path-concat": "warn",+ "n/no-deprecated-api": "warn",+ "no-async-promise-executor": "warn"},"overrides": [{- "files": [- "**/*.js"- ],+ "files": ["*.js"],"rules": {- /* BEGIN Airbnb overrides-- Rules below are overriding the Airbnb style guide rules in order to get code- to pass without having to fix hundreds of existing errors by hand.-- For rules set to "off": consider setting to "warn" to identify non-compliance in new code- For rules set to "warn": consider removing to throw errors on existing and future code- */- // Base rule overrides- "no-nested-ternary": "off", // 58 errors- "no-shadow": "warn", // 136 errors- "max-len": "off",- "consistent-return": "off", // 73 errors- "no-underscore-dangle": "off",- "func-names": "off",- "no-param-reassign": [ // 329 errors- "warn",- {- "props": false- }- ],- "no-use-before-define": [- "error",- {- "functions": false,- "classes": true,- "variables": false- }- ],- // Import rules overrides- "import/no-cycle": "warn",- // Accesibility rules overrides- "jsx-a11y/no-noninteractive-tabindex": "off",- "jsx-a11y/no-noninteractive-element-interactions": "off",- "jsx-a11y/anchor-has-content": "off",- "jsx-a11y/control-has-associated-label": "off",- "jsx-a11y/anchor-is-valid": "off",- "jsx-a11y/label-has-associated-control": "off",- "jsx-a11y/alt-text": "off",- "jsx-a11y/mouse-events-have-key-events": "off",- "jsx-a11y/tabindex-no-positive": "off",- "jsx-a11y/no-static-element-interactions": "off",- "jsx-a11y/click-events-have-key-events": "off",- // React rules overrides- "react/jsx-props-no-spreading": "warn", // 17 errors- "react/jsx-filename-extension": "off",- "react/jsx-no-bind": "warn",- "react/sort-comp": [- "error",- {- "order": [- "static-methods",- "lifecycle",- "everything-else",- "render"- ],- "groups": {- "lifecycle": [- "displayName",- "propTypes",- "contextTypes",- "childContextTypes",- "mixins",- "statics",- "defaultProps",- "constructor",- "getDefaultProps",- "state",- "getInitialState",- "getChildContext",- "getDerivedStateFromProps",- "componentWillMount",- "UNSAFE_componentWillMount",- "componentDidMount",- "componentWillReceiveProps",- "UNSAFE_componentWillReceiveProps",- "shouldComponentUpdate",- "componentWillUpdate",- "UNSAFE_componentWillUpdate",- "getSnapshotBeforeUpdate",- "componentDidUpdate",- "componentDidCatch",- "componentWillUnmount"- ]- }- }- ],- "react/forbid-prop-types": "off", // 216 errors- "react/require-default-props": "off" // 965 errors+ "no-undef": "off",+ "n/no-unpublished-require": "off",+ "no-unused-expressions": "off"}}]diff --git a/babel.config.js b/babel.config.jsindex 75faf1bb9..3323e775f 100644--- a/babel.config.js+++ b/babel.config.js@@ -5,23 +5,23 @@ module.exports = {{useBuiltIns: 'entry',corejs: '2.0',- loose: true,+ loose: true}],['@babel/preset-react',{useBuiltIns: 'entry',- corejs: '2.0',- },- ],+ corejs: '2.0'+ }+ ]],plugins: [['@babel/plugin-proposal-class-properties',{- loose: true,- },- ],- ],-};+ loose: true+ }+ ]+ ]+}diff --git a/e2e/.eslintrc b/e2e/.eslintrcdeleted file mode 100644index 069c5e096..000000000--- a/e2e/.eslintrc+++ /dev/null@@ -1,56 +0,0 @@-{- "env": {- "browser": true,- "node": true- },- "parserOptions": {- "ecmaVersion": 5,- "sourceType": "module",- "ecmaFeatures": {- "jsx": false- }- },- "extends": "airbnb",- "rules": {- // The following rules are cases where our base rules- // differed from AirBnB Style guide. Keeping for now.- "import/no-extraneous-dependencies": [- "error",- {- "devDependencies": [- "*.js",- "**/*.js"- ]- }- ],- "no-unused-vars": [- "error",- {- "vars": "all",- "args": "none"- }- ],- "space-before-function-paren": [- "error",- "never"- ],- "no-storage/no-browser-storage": "off",- "no-multiple-empty-lines": "off",- // Must be disabled for e2e assertions- "no-unused-expressions": "off",- /* BEGIN Airbnb overrides- Rules below are overriding the Airbnb style guide rules in order to get existing code- to pass without having to fix hundreds of existing errors by hand.-- For rules set to "off": consider setting to "warn" to identify non-compliance in new code- For rules set to "warn": consider removing to throw errors on existing and future code- */- "no-param-reassign": "warn",- "max-len": "off",- "func-names": "off",- "no-shadow": "off",- "no-plusplus": "off",- "prefer-arrow-callback": "off",- "import/extensions": "off",- }-}\ No newline at end of filediff --git a/e2e/browserstack.conf.js b/e2e/browserstack.conf.jsindex cba0d7a31..cbde533f5 100644--- a/e2e/browserstack.conf.js+++ b/e2e/browserstack.conf.js@@ -1,9 +1,9 @@-const glob = require('glob');-const environments = require('./environments.js');+const glob = require('glob')+const environments = require('./environments.js')-const files = glob.sync('./e2e/features/**/*-test.js');-const now = new Date();-const timeStamp = `${now.getMonth() + 1}/${now.getDate()} @ ${now.getHours()}:${now.getMinutes()}`;+const files = glob.sync('./e2e/features/**/*-test.js')+const now = new Date()+const timeStamp = `${now.getMonth() + 1}/${now.getDate()} @ ${now.getHours()}:${now.getMinutes()}`const nightwatchConfig = {output_folder: './e2e/reports',@@ -13,7 +13,7 @@ const nightwatchConfig = {selenium: {start_process: false,host: 'hub-cloud.browserstack.com',- port: 80,+ port: 80},common_capabilities: {'browserstack.user': process.env.BROWSERSTACK_USER,@@ -25,27 +25,27 @@ const nightwatchConfig = {applicationCacheEnabled: false,webStorageEnabled: false,marionette: true,- project: 'Worldview',+ project: 'Worldview'},test_settings: {default: {},browserstack: {desiredCapabilities: {- browser: 'chrome',- },+ browser: 'chrome'+ }},chrome: {desiredCapabilities: {browser: 'chrome',marionette: true,- 'browserstack.selenium_version': '3.5.2',- },+ 'browserstack.selenium_version': '3.5.2'+ }},safari: {desiredCapabilities: {browser: 'safari',- 'browserstack.selenium_version': '3.5.2',- },+ 'browserstack.selenium_version': '3.5.2'+ }},firefox: {desiredCapabilities: {@@ -54,32 +54,32 @@ const nightwatchConfig = {browserName: 'firefox',javascriptEnabled: true,'browserstack.selenium_version': '3.10.0',- 'browserstack.geckodriver': '0.24.0',- },- },- },-};+ 'browserstack.geckodriver': '0.24.0'+ }+ }+ }+}environments.forEach((e) => {const env = [e.browser,e.browser_version,e.os,- e.os_version,- ].join('_').replace(/\./g, '-').replace(/ /g, '_');- nightwatchConfig.test_settings[env] = { desiredCapabilities: e };-});+ e.os_version+ ].join('_').replace(/\./g, '-').replace(/ /g, '_')+ nightwatchConfig.test_settings[env] = { desiredCapabilities: e }+})// Merge common_capabilities with each test_settings keyObject.keys(nightwatchConfig.test_settings).forEach((settingKey) => {- const config = nightwatchConfig.test_settings[settingKey];- config.selenium_host = nightwatchConfig.selenium.host;- config.selenium_port = nightwatchConfig.selenium.port;- config.desiredCapabilities = config.desiredCapabilities || {};- const capabilityKeys = Object.keys(nightwatchConfig.common_capabilities);+ const config = nightwatchConfig.test_settings[settingKey]+ config.selenium_host = nightwatchConfig.selenium.host+ config.selenium_port = nightwatchConfig.selenium.port+ config.desiredCapabilities = config.desiredCapabilities || {}+ const capabilityKeys = Object.keys(nightwatchConfig.common_capabilities)capabilityKeys.forEach((capabilityKey) => {- config.desiredCapabilities[capabilityKey] = config.desiredCapabilities[capabilityKey]- || nightwatchConfig.common_capabilities[capabilityKey];- });-});-module.exports = nightwatchConfig;+ config.desiredCapabilities[capabilityKey] = config.desiredCapabilities[capabilityKey] ||+ nightwatchConfig.common_capabilities[capabilityKey]+ })+})+module.exports = nightwatchConfigdiff --git a/e2e/browserstack.js b/e2e/browserstack.jsindex dd910d5c5..9d8d2ac7e 100644--- a/e2e/browserstack.js+++ b/e2e/browserstack.js@@ -1,59 +1,58 @@-#!/usr/bin/env node-/* eslint no-console: "off", camelcase: "off" */+/* eslint new-cap: "off" */-const Nightwatch = require('nightwatch');-const browserstack = require('browserstack-local');-const environments = require('./environments.js');+const Nightwatch = require('nightwatch')+const browserstack = require('browserstack-local')+const environments = require('./environments.js')-const environment_names = environments.map(+const environmentNames = environments.map((e) => [e.browser,e.browser_version,e.os,- e.os_version,- ].join('_').replace(/\./g, '-').replace(/ /g, '_'),-);+ e.os_version+ ].join('_').replace(/\./g, '-').replace(/ /g, '_')+)try {- process.mainModule.filename = './node_modules/nightwatch/bin/nightwatch';+ process.mainModule.filename = './node_modules/nightwatch/bin/nightwatch'// Code to start browserstack local before start of test- console.log('Connecting localhost to Browserstack...');- const bs_local = new browserstack.Local();- Nightwatch.bs_local = bs_local;+ console.log('Connecting localhost to Browserstack...')+ const bsLocal = new browserstack.Local()+ Nightwatch.bs_local = bsLocalbs_local.start({key: process.env.BROWSERSTACK_ACCESS_KEY,localIdentifier: `wvtester19234${process.env.BROWSERSTACK_USER}`.replace(/[^a-zA-Z0-9]/g, ''),- force: 'true', // if you want to kill existing ports+ force: 'true' // if you want to kill existing ports}, (error) => {- if (error) throw new Error(error);- console.log('Connected. Running tests...');- console.log('Go to https://www.browserstack.com/automate to view tests in progress.');+ if (error) throw new Error(error)+ console.log('Connected. Running tests...')+ console.log('Go to https://www.browserstack.com/automate to view tests in progress.')Nightwatch.cli((argv) => {- const envString = environment_names.join(',');- argv.e = envString;- argv.env = envString;+ const envString = environmentNames.join(',')+ argv.e = envString+ argv.env = envStringNightwatch.CliRunner(argv).setup(null, () => {bs_local.stop(() => {- process.exitCode = 0;- });+ process.exitCode = 0+ })}).runTests(() => {bs_local.stop(() => {if (bs_local.pid && process) {- process.exitCode = 0;+ process.exitCode = 0}- });+ })}).catch((err) => {- console.error(err);- process.exitCode = 1;- });- });- });+ console.error(err)+ process.exitCode = 1+ })+ })+ })} catch (ex) {- console.log('There was an error while starting the test runner:\n\n');- process.stderr.write(`${ex.stack}\n`);- process.exitCode = 1;+ console.log('There was an error while starting the test runner:\n\n')+ process.stderr.write(`${ex.stack}\n`)+ process.exitCode = 1}diff --git a/e2e/custom-assertions/elementCountEquals.js b/e2e/custom-assertions/elementCountEquals.jsindex 5a625e8e8..06d77cae5 100644--- a/e2e/custom-assertions/elementCountEquals.js+++ b/e2e/custom-assertions/elementCountEquals.js@@ -6,19 +6,19 @@//// for how to write custom assertions see// http://nightwatchjs.org/guide#writing-custom-assertions-exports.assertion = function(selector, count) {- this.message = `Testing if element <${selector}> has count: ${count}`;- this.expected = count;- this.pass = function(val) {- return val === this.expected;- };- this.value = function(res) {- return res.value;- };- this.command = function(cb) {- const self = this;+exports.assertion = function (selector, count) {+ this.message = `Testing if element <${selector}> has count: ${count}`+ this.expected = count+ this.pass = function (val) {+ return val === this.expected+ }+ this.value = function (res) {+ return res.value+ }+ this.command = function (cb) {+ const self = thisreturn this.api.execute((selector) => document.querySelectorAll(selector).length, [selector], (res) => {- cb.call(self, res);- });- };-};+ cb.call(self, res)+ })+ }+}diff --git a/e2e/custom-assertions/elementCountGreater.js b/e2e/custom-assertions/elementCountGreater.jsindex 6e8feb93a..87105d52d 100644--- a/e2e/custom-assertions/elementCountGreater.js+++ b/e2e/custom-assertions/elementCountGreater.js@@ -6,19 +6,19 @@//// for how to write custom assertions see// http://nightwatchjs.org/guide#writing-custom-assertions-exports.assertion = function(selector, count) {- this.message = `Testing if element <${selector}> has count: ${count}`;- this.expected = count;- this.pass = function(val) {- return val >= this.expected;- };- this.value = function(res) {- return res.value;- };- this.command = function(cb) {- const self = this;+exports.assertion = function (selector, count) {+ this.message = `Testing if element <${selector}> has count: ${count}`+ this.expected = count+ this.pass = function (val) {+ return val >= this.expected+ }+ this.value = function (res) {+ return res.value+ }+ this.command = function (cb) {+ const self = thisreturn this.api.execute((selector) => document.querySelectorAll(selector).length, [selector], (res) => {- cb.call(self, res);- });- };-};+ cb.call(self, res)+ })+ }+}diff --git a/e2e/custom-assertions/urlParameterEquals.js b/e2e/custom-assertions/urlParameterEquals.jsindex 3055c2d82..fba56851e 100644--- a/e2e/custom-assertions/urlParameterEquals.js+++ b/e2e/custom-assertions/urlParameterEquals.js@@ -1,24 +1,24 @@// eslint-disable-next-line no-redeclare-const { URL } = require('url');+const { URL } = require('url')-exports.assertion = function(parameter, value) {- this.message = `Testing if URL parameter "${parameter}" has value: ${value}`;- this.expected = `${parameter}=${value}`;- this.pass = function(value) {- const expected = this.expected.split('=');- const expectedParam = expected[0];- const expectedValue = expected[1];+exports.assertion = function (parameter, value) {+ this.message = `Testing if URL parameter "${parameter}" has value: ${value}`+ this.expected = `${parameter}=${value}`+ this.pass = function (value) {+ const expected = this.expected.split('=')+ const expectedParam = expected[0]+ const expectedValue = expected[1]if (expectedValue === 'true') {- return !!value.get(expectedParam);+ return !!value.get(expectedParam)}- return value.get(expectedParam) === expectedValue;- };- this.value = function(result) {- const url = new URL(result.value);- return url.searchParams;- };- this.command = function(cb) {- this.api.url(cb);- return this;- };-};+ return value.get(expectedParam) === expectedValue+ }+ this.value = function (result) {+ const url = new URL(result.value)+ return url.searchParams+ }+ this.command = function (cb) {+ this.api.url(cb)+ return this+ }+}diff --git a/e2e/environments.js b/e2e/environments.jsindex 55654050e..9b6ae0cad 100644--- a/e2e/environments.js+++ b/e2e/environments.js@@ -1,9 +1,9 @@-const bsCapabilities = require('browserstack-capabilities');+const bsCapabilities = require('browserstack-capabilities')const createCapabilities = bsCapabilities(process.env.BROWSERSTACK_USER,- process.env.BROWSERSTACK_ACCESS_KEY,-).create;+ process.env.BROWSERSTACK_ACCESS_KEY+).createconst capabilities = createCapabilities([@@ -11,25 +11,25 @@ const capabilities = createCapabilities(browser: 'firefox',browser_version: ['69.0'],os: ['OS X'],- os_version: ['High Sierra'],+ os_version: ['High Sierra']},{browser: 'chrome',browser_version: ['76.0'],os: ['OS X'],- os_version: ['Mojave'],+ os_version: ['Mojave']},{browser: 'ie',browser_version: ['11.0'],os: ['Windows'],- os_version: ['10'],- },- ],-);+ os_version: ['10']+ }+ ]+)capabilities.forEach((capability) => {- capability.resolution = '1280x1024';-});+ capability.resolution = '1280x1024'+})-module.exports = capabilities;+module.exports = capabilitiesdiff --git a/e2e/features/animation/animation-test.js b/e2e/features/animation/animation-test.jsindex 210e5265e..3d73bf8b4 100644--- a/e2e/features/animation/animation-test.js+++ b/e2e/features/animation/animation-test.js@@ -1,5 +1,5 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localQueryStrings = require('../../reuseables/querystrings.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localQueryStrings = require('../../reuseables/querystrings.js')const {dragger,animationWidget,@@ -18,26 +18,26 @@ const {hourEndInput,minuteEndInput,animationIntervalSelector,- animationFrameSlider,-} = require('../../reuseables/selectors.js');+ animationFrameSlider+} = require('../../reuseables/selectors.js')-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {'@tags': ['localStorageDisabled'],- beforeEach(c) {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ beforeEach (c) {+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},'Clicking the animation widget button opens the widget': (c) => {c.waitForElementVisible(dragger, TIME_LIMIT, (el) => {- c.expect.element(animationWidget).to.not.be.present;- c.useCss().click(animationButton);- c.waitForElementVisible(animationWidget, TIME_LIMIT);- });+ c.expect.element(animationWidget).to.not.be.present+ c.useCss().click(animationButton)+ c.waitForElementVisible(animationWidget, TIME_LIMIT)+ })},'Opening custom interval widget': (c) => {- c.url(c.globals.url + localQueryStrings.activeAnimationWidget);+ c.url(c.globals.url + localQueryStrings.activeAnimationWidget)c.waitForElementVisible(animationButton,TIME_LIMIT,@@ -46,42 +46,42 @@ module.exports = {.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');- c.pause(300);- c.useCss().assert.elementPresent('#wv-animation-widget .custom-interval-widget');- c.useCss().assert.containsText('.wv-animation-widget-header #current-interval', '1 DAY');- c.useCss().assert.containsText('#timeline #current-interval', '1 DAY');- },- );+ .click('.wv-animation-widget-header .timeline-interval #interval-custom-static')+ c.pause(300)+ c.useCss().assert.elementPresent('#wv-animation-widget .custom-interval-widget')+ c.useCss().assert.containsText('.wv-animation-widget-header #current-interval', '1 DAY')+ c.useCss().assert.containsText('#timeline #current-interval', '1 DAY')+ }+ )},'Changing date range of animation via timeline dragger': (c) => {- c.url(c.globals.url + localQueryStrings.activeAnimationWidget);+ c.url(c.globals.url + localQueryStrings.activeAnimationWidget)// Test Permalink opens widgetc.waitForElementVisible('#day-animation-widget-start',TIME_LIMIT,(el) => {c.getValue('#day-animation-widget-start', (result) => {- const startDay = result;+ const startDay = resultc.useCss().moveToElement('#wv-timeline-range-selector > g:nth-child(2) > rect',1,- 1,+ 1).mouseButtonDown(0).moveToElement('.timeline-dragger', 0, 0).mouseButtonUp(0)- .pause(2000);+ .pause(2000)c.getValue('#day-animation-widget-start', (result) => {- const newDay = result;- c.assert.notEqual(startDay, newDay);- });- });- },- );+ const newDay = result+ c.assert.notEqual(startDay, newDay)+ })+ })+ }+ )},'Changing animation time interval': (c) => {@@ -89,8 +89,8 @@ module.exports = {// because of selenium catching.// Loading a different Url fixed the problem// https://github.com/SeleniumHQ/selenium/issues/4724#issuecomment-330862710- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.useCss().click(animationButton);+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.useCss().click(animationButton)c.waitForElementVisible(animationButton,TIME_LIMIT,@@ -99,53 +99,53 @@ module.exports = {.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');- c.pause(1000);- c.useCss().assert.containsText('.wv-animation-widget-header #current-interval', '1 YEAR');- c.useCss().assert.containsText('#timeline #current-interval', '1 YEAR');- },- );+ .click('.wv-animation-widget-header #timeline-interval #interval-years')+ c.pause(1000)+ c.useCss().assert.containsText('.wv-animation-widget-header #current-interval', '1 YEAR')+ c.useCss().assert.containsText('#timeline #current-interval', '1 YEAR')+ }+ )},'Disable when playing': (c) => {- c.url(c.globals.url + localQueryStrings.animationGeostationary);- c.waitForElementVisible(animationButton, TIME_LIMIT);- c.click(playButton);- c.pause(1000);- c.assert.attributeEquals(yearStartInput, 'disabled', 'true');- c.assert.attributeEquals(yearEndInput, 'disabled', 'true');- c.assert.attributeEquals(monthStartInput, 'disabled', 'true');- c.assert.attributeEquals(monthEndInput, 'disabled', 'true');- c.assert.attributeEquals(dayStartInput, 'disabled', 'true');- c.assert.attributeEquals(dayEndInput, 'disabled', 'true');- c.assert.attributeEquals(hourStartInput, 'disabled', 'true');- c.assert.attributeEquals(hourEndInput, 'disabled', 'true');- c.assert.attributeEquals(minuteStartInput, 'disabled', 'true');- c.assert.attributeEquals(minuteEndInput, 'disabled', 'true');- c.assert.cssClassPresent(animationFrameSlider, 'rc-slider-disabled');- c.assert.cssClassPresent(animationIntervalSelector, 'disabled');- c.click(playButton);+ c.url(c.globals.url + localQueryStrings.animationGeostationary)+ c.waitForElementVisible(animationButton, TIME_LIMIT)+ c.click(playButton)+ c.pause(1000)+ c.assert.attributeEquals(yearStartInput, 'disabled', 'true')+ c.assert.attributeEquals(yearEndInput, 'disabled', 'true')+ c.assert.attributeEquals(monthStartInput, 'disabled', 'true')+ c.assert.attributeEquals(monthEndInput, 'disabled', 'true')+ c.assert.attributeEquals(dayStartInput, 'disabled', 'true')+ c.assert.attributeEquals(dayEndInput, 'disabled', 'true')+ c.assert.attributeEquals(hourStartInput, 'disabled', 'true')+ c.assert.attributeEquals(hourEndInput, 'disabled', 'true')+ c.assert.attributeEquals(minuteStartInput, 'disabled', 'true')+ c.assert.attributeEquals(minuteEndInput, 'disabled', 'true')+ c.assert.cssClassPresent(animationFrameSlider, 'rc-slider-disabled')+ c.assert.cssClassPresent(animationIntervalSelector, 'disabled')+ c.click(playButton)},'Disable playback when max frames exceeded': (c) => {- c.url(c.globals.url + localQueryStrings.animationGeostationary);- c.click(animateYearDown);- c.pause(500);- c.assert.cssClassPresent(playButton, 'disabled');+ c.url(c.globals.url + localQueryStrings.animationGeostationary)+ c.click(animateYearDown)+ c.pause(500)+ c.assert.cssClassPresent(playButton, 'disabled')// Playback re-enabled when frames within the max- c.click(animateYearUp);- c.pause(500);- c.assert.not.cssClassPresent(playButton, 'disabled');+ c.click(animateYearUp)+ c.pause(500)+ c.assert.not.cssClassPresent(playButton, 'disabled')// App should not freeze when dates roll over- c.click(animateYearUp);- c.pause(500);- c.assert.value(yearStartInput, '1948');- c.assert.cssClassPresent(playButton, 'disabled');+ c.click(animateYearUp)+ c.pause(500)+ c.assert.value(yearStartInput, '1948')+ c.assert.cssClassPresent(playButton, 'disabled')},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/animation/gif-test.js b/e2e/features/animation/gif-test.jsindex 78fc899a7..f8fede256 100644--- a/e2e/features/animation/gif-test.js+++ b/e2e/features/animation/gif-test.js@@ -1,76 +1,76 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');-const localQueryStrings = require('../../reuseables/querystrings.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')+const localQueryStrings = require('../../reuseables/querystrings.js')-const TIME_LIMIT = 30000; // Sometimes takes a while to generate GIFs-const askDialog = '.modal-body .notify';-const paletteDialogOkButton = '#image_download_notify_palette .accept-notify';-const rotationDialogOkButton = '#image_download_notify_rotate .accept-notify';-const articeRotationResetButton = '.wv-map-reset-rotation';+const TIME_LIMIT = 30000 // Sometimes takes a while to generate GIFs+const askDialog = '.modal-body .notify'+const paletteDialogOkButton = '#image_download_notify_palette .accept-notify'+const rotationDialogOkButton = '#image_download_notify_rotate .accept-notify'+const articeRotationResetButton = '.wv-map-reset-rotation'module.exports = {- before(client) {- reuseables.loadAndSkipTour(client, TIME_LIMIT);+ before (client) {+ reuseables.loadAndSkipTour(client, TIME_LIMIT)},- 'Downloading GIF when custom colormap is activated': function(client) {+ 'Downloading GIF when custom colormap is activated': function (client) {if (client.options.desiredCapabilities.browserName !== 'ie') {// Custom colormaps down exist in IE- client.url(client.globals.url + localQueryStrings.activeCustomColormap);+ client.url(client.globals.url + localQueryStrings.activeCustomColormap)client.waitForElementVisible(localSelectors.animationWidget,TIME_LIMIT,() => {- client.click(localSelectors.createGifIcon).pause(1000);- client.expect.element(askDialog).to.be.present;+ client.click(localSelectors.createGifIcon).pause(1000)+ client.expect.element(askDialog).to.be.presentclient.useCss().click(paletteDialogOkButton)- .pause(1000);- client.click(localSelectors.createGifButton).pause(1000);+ .pause(1000)+ client.click(localSelectors.createGifButton).pause(1000)client.waitForElementVisible(localSelectors.gifResults,TIME_LIMIT,() => {- client.click(client.globals.selectors.modalCloseButton);+ client.click(client.globals.selectors.modalCloseButton)client.expect.element(localSelectors.gifResults).to.not.be- .present;+ .presentclient.waitForElementVisible(localSelectors.animationWidget,- TIME_LIMIT,- );- },- );- },- );+ TIME_LIMIT+ )+ }+ )+ }+ )}},- 'Downloading GIF when polar projection is rotated': function(client) {+ 'Downloading GIF when polar projection is rotated': function (client) {client.url(- client.globals.url + localQueryStrings.animationProjectionRotated,- );+ client.globals.url + localQueryStrings.animationProjectionRotated+ )client.waitForElementVisible(localSelectors.animationWidget,TIME_LIMIT,() => {- client.click(localSelectors.createGifIcon).pause(1000);- client.useCss().assert.containsText(articeRotationResetButton, '-18');+ client.click(localSelectors.createGifIcon).pause(1000)+ client.useCss().assert.containsText(articeRotationResetButton, '-18')client.useCss().click(rotationDialogOkButton)- .pause(1000);- client.useCss().assert.containsText(articeRotationResetButton, '0');- },- );+ .pause(1000)+ client.useCss().assert.containsText(articeRotationResetButton, '0')+ }+ )},- 'GIF selection preview is Accurate and selections that are too high disable GIF download': function(- client,+ 'GIF selection preview is Accurate and selections that are too high disable GIF download': function (+ client) {- client.url(client.globals.url + localQueryStrings.activeAnimationWidget);+ client.url(client.globals.url + localQueryStrings.activeAnimationWidget)client.waitForElementVisible(localSelectors.animationWidget,TIME_LIMIT,() => {- client.click(localSelectors.createGifIcon).pause(1000);+ client.click(localSelectors.createGifIcon).pause(1000)client.waitForElementVisible(localSelectors.createGifButton,TIME_LIMIT,@@ -79,61 +79,61 @@ module.exports = {.useCss().assert.containsText(localSelectors.gifPreviewStartDate,- '2018 MAR 28',- );+ '2018 MAR 28'+ )client.useCss().assert.containsText(localSelectors.gifPreviewEndDate,- '2018 APR 04',- );+ '2018 APR 04'+ )client.useCss().assert.containsText(localSelectors.gifPreviewFrameRateValue,- '3 Frames Per Second',- );- client.useCss().assert.containsText('.gif-max-size', '8200px');- client.assert.ok('#wv-checkbox-gif'); // checkbox is checked+ '3 Frames Per Second'+ )+ client.useCss().assert.containsText('.gif-max-size', '8200px')+ client.assert.ok('#wv-checkbox-gif') // checkbox is checkedclient.click(localSelectors.gifPreviewEndResolutionOption500)- .pause(1000);+ .pause(1000)client.assert.value(localSelectors.gifPreviewEndResolutionSelector,- '2',- );+ '2'+ )client.expect.element(localSelectors.gifDownloadButton).to.not.be- .enabled;- },- );- },- );+ .enabled+ }+ )+ }+ )},- 'GIF download is disabled when too many frames would be requested with standard interval': function(- client,+ 'GIF download is disabled when too many frames would be requested with standard interval': function (+ client) {- client.url(client.globals.url + localQueryStrings.animationTooManyFramesGif);+ client.url(client.globals.url + localQueryStrings.animationTooManyFramesGif)client.waitForElementVisible(localSelectors.animationWidget,TIME_LIMIT,() => {- client.useCss().assert.cssClassPresent('#create-gif-button', 'disabled');- },- );+ client.useCss().assert.cssClassPresent('#create-gif-button', 'disabled')+ }+ )},- 'GIF download is disabled when too many frames would be requested with custom interval': function(- client,+ 'GIF download is disabled when too many frames would be requested with custom interval': function (+ client) {- client.url(client.globals.url + localQueryStrings.animationTooManyFramesGifCustomInterval);+ client.url(client.globals.url + localQueryStrings.animationTooManyFramesGifCustomInterval)client.waitForElementVisible(localSelectors.animationWidget,TIME_LIMIT,() => {- client.useCss().assert.cssClassPresent('#create-gif-button', 'disabled');- },- );+ client.useCss().assert.cssClassPresent('#create-gif-button', 'disabled')+ }+ )},- after(client) {- client.end();- },-};+ after (client) {+ client.end()+ }+}diff --git a/e2e/features/animation/mobile-animation-test.js b/e2e/features/animation/mobile-animation-test.jsindex 3765a9b0d..6344181c9 100644--- a/e2e/features/animation/mobile-animation-test.js+++ b/e2e/features/animation/mobile-animation-test.js@@ -1,22 +1,22 @@-const localQueryStrings = require('../../reuseables/querystrings.js');+const localQueryStrings = require('../../reuseables/querystrings.js')-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {before: (c) => {- c.url(c.globals.url + localQueryStrings.knownDate);- c.pause(1000);- c.setWindowSize(375, 667);- c.pause(1000);+ c.url(c.globals.url + localQueryStrings.knownDate)+ c.pause(1000)+ c.setWindowSize(375, 667)+ c.pause(1000)},'Mobile animate button opens widget': (c) => {- c.waitForElementVisible('.mobile-animate-button', TIME_LIMIT);- c.useCss().click('.mobile-animate-button');- c.pause(500);- c.waitForElementPresent('#wv-animation-widget', TIME_LIMIT);- c.expect.element('.custom-interval-delta-input').to.have.value.that.equals('1');- c.expect.element('.dropdown-toggle').text.to.equal('DAY');+ c.waitForElementVisible('.mobile-animate-button', TIME_LIMIT)+ c.useCss().click('.mobile-animate-button')+ c.pause(500)+ c.waitForElementPresent('#wv-animation-widget', TIME_LIMIT)+ c.expect.element('.custom-interval-delta-input').to.have.value.that.equals('1')+ c.expect.element('.dropdown-toggle').text.to.equal('DAY')},'Minimizing mobile animation widget opens collapsed animation widget': (c) => {@@ -25,21 +25,21 @@ module.exports = {},'Playing the animation changes the date of the mobile date picker': (c) => {- c.useCss().click('#collapsed-animate-widget-phone-portrait');+ c.useCss().click('#collapsed-animate-widget-phone-portrait')// this pause is the minimum amount of time needed to load & play the animation on a throttled connection- c.pause(20000);- c.expect.element('.mobile-date-picker-select-btn-text span').text.to.equal('2019 AUG 01');+ c.pause(20000)+ c.expect.element('.mobile-date-picker-select-btn-text span').text.to.equal('2019 AUG 01')},'Pressing the animation button brings up the mobile animation widget with the same information': (c) => {- c.useCss().click('.mobile-animate-button');- c.pause(500);- c.waitForElementVisible('#wv-animation-widget', TIME_LIMIT);- c.expect.element('#mobile-animation-start-date .mobile-date-picker-select-btn span').text.to.equal('2019 JUL 22');- c.expect.element('#mobile-animation-end-date .mobile-date-picker-select-btn span').text.to.equal('2019 AUG 01');+ c.useCss().click('.mobile-animate-button')+ c.pause(500)+ c.waitForElementVisible('#wv-animation-widget', TIME_LIMIT)+ c.expect.element('#mobile-animation-start-date .mobile-date-picker-select-btn span').text.to.equal('2019 JUL 22')+ c.expect.element('#mobile-animation-end-date .mobile-date-picker-select-btn span').text.to.equal('2019 AUG 01')},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/compare/compare-mobile-test.js b/e2e/features/compare/compare-mobile-test.jsindex 3ecc31e02..e8618fcf7 100644--- a/e2e/features/compare/compare-mobile-test.js+++ b/e2e/features/compare/compare-mobile-test.js@@ -1,6 +1,6 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');-const localQueryStrings = require('../../reuseables/querystrings.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')+const localQueryStrings = require('../../reuseables/querystrings.js')const {aTab,@@ -11,86 +11,86 @@ const {collapsedLayerButton,layerContainer,mobileDatePickerSelectButton,- swipeDragger,-} = localSelectors;+ swipeDragger+} = localSelectors-const aMobileCompareButton = `${compareMobileSelectToggle} > div:nth-child(1)`;-const bMobileCompareButton = `${compareMobileSelectToggle} > div:nth-child(2)`;+const aMobileCompareButton = `${compareMobileSelectToggle} > div:nth-child(1)`+const bMobileCompareButton = `${compareMobileSelectToggle} > div:nth-child(2)`-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {before: (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.setWindowSize(375, 667); // iPhone 6/7/8 dimensions+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.setWindowSize(375, 667) // iPhone 6/7/8 dimensions},// load SWIPE and verify that it is active'Mobile SWIPE is loaded': (c) => {- c.url(c.globals.url + localQueryStrings.swipeAndAIsActive);- c.waitForElementVisible(swipeDragger, TIME_LIMIT);+ c.url(c.globals.url + localQueryStrings.swipeAndAIsActive)+ c.waitForElementVisible(swipeDragger, TIME_LIMIT)},// load SWIPE and verify mobile compare A|B toggle buttons are visible'Mobile comparison A|B toggle buttons are visible and only A is selected by default': (c) => {- c.waitForElementVisible(compareMobileSelectToggle, TIME_LIMIT);- c.assert.cssClassPresent(aMobileCompareButton, 'compare-btn-selected');- c.assert.not.cssClassPresent(bMobileCompareButton, 'compare-btn-selected');+ c.waitForElementVisible(compareMobileSelectToggle, TIME_LIMIT)+ c.assert.cssClassPresent(aMobileCompareButton, 'compare-btn-selected')+ c.assert.not.cssClassPresent(bMobileCompareButton, 'compare-btn-selected')},// toggle select B change compare mode date to B'Toggling to B compare side changes mobile date picker date': (c) => {// confirm initial A mobile date picker datec.waitForElementVisible(mobileDatePickerSelectButton, TIME_LIMIT, (e) => {- c.assert.containsText(mobileDatePickerSelectButton, '2018 AUG 17');- });+ c.assert.containsText(mobileDatePickerSelectButton, '2018 AUG 17')+ })// click B compare toggle button and confirm B mobile date picker date- c.click(bMobileCompareButton);+ c.click(bMobileCompareButton)c.waitForElementVisible(mobileDatePickerSelectButton, TIME_LIMIT, (e) => {- c.assert.containsText(mobileDatePickerSelectButton, '2018 AUG 16');- });+ c.assert.containsText(mobileDatePickerSelectButton, '2018 AUG 16')+ })},'Expand mobile layer list and confirm comparison mode button is present and toggles compare mode': (c) => {- c.click(collapsedLayerButton);+ c.click(collapsedLayerButton)c.waitForElementVisible(layerContainer, TIME_LIMIT, (e) => {- c.assert.elementPresent(compareButton);- c.assert.elementPresent(aTab);- c.assert.elementPresent(bTab);- c.assert.containsText(compareButtonText, 'Exit Comparison Mode');- });+ c.assert.elementPresent(compareButton)+ c.assert.elementPresent(aTab)+ c.assert.elementPresent(bTab)+ c.assert.containsText(compareButtonText, 'Exit Comparison Mode')+ })- c.click(compareButton);+ c.click(compareButton)c.waitForElementVisible(compareButtonText, TIME_LIMIT, (e) => {- c.assert.elementNotPresent(aTab);- c.assert.elementNotPresent(bTab);- c.assert.elementPresent(compareButton);- c.assert.containsText(compareButtonText, 'Start Comparison Mode');- });+ c.assert.elementNotPresent(aTab)+ c.assert.elementNotPresent(bTab)+ c.assert.elementPresent(compareButton)+ c.assert.containsText(compareButtonText, 'Start Comparison Mode')+ })},// B compare button toggle is selected on B permalink load and A is not selected'B compare button toggle is only selected on B permalink load': (c) => {- c.url(c.globals.url + localQueryStrings.spyAndBIsActive);- c.waitForElementVisible(swipeDragger, TIME_LIMIT);- c.assert.not.cssClassPresent(aMobileCompareButton, 'compare-btn-selected');- c.assert.cssClassPresent(bMobileCompareButton, 'compare-btn-selected');+ c.url(c.globals.url + localQueryStrings.spyAndBIsActive)+ c.waitForElementVisible(swipeDragger, TIME_LIMIT)+ c.assert.not.cssClassPresent(aMobileCompareButton, 'compare-btn-selected')+ c.assert.cssClassPresent(bMobileCompareButton, 'compare-btn-selected')},// load comparison SPY mode and verify that it reverts to SWIPE mode'Mobile SPY mode reverts to SWIPE mode': (c) => {- c.url(c.globals.url + localQueryStrings.spyAndBIsActive);- c.waitForElementVisible(swipeDragger, TIME_LIMIT);- c.pause(500);+ c.url(c.globals.url + localQueryStrings.spyAndBIsActive)+ c.waitForElementVisible(swipeDragger, TIME_LIMIT)+ c.pause(500)},// load comparison OPACITY mode and verify that it reverts to SWIPE mode'Mobile OPACITY mode reverts to SWIPE mode': (c) => {- c.url(c.globals.url + localQueryStrings.opacityAndBIsActive);- c.waitForElementVisible(swipeDragger, TIME_LIMIT);- c.pause(500);+ c.url(c.globals.url + localQueryStrings.opacityAndBIsActive)+ c.waitForElementVisible(swipeDragger, TIME_LIMIT)+ c.pause(500)},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/compare/compare-test.js b/e2e/features/compare/compare-test.jsindex c8c91060e..55e9e129a 100644--- a/e2e/features/compare/compare-test.js+++ b/e2e/features/compare/compare-test.js@@ -1,6 +1,6 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');-const localQueryStrings = require('../../reuseables/querystrings.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')+const localQueryStrings = require('../../reuseables/querystrings.js')const {animationButtonCase,@@ -8,114 +8,114 @@ const {dataDownloadTabButton,eventsSidebarTabButton,snapshotToolbarButton,- swipeDragger,-} = localSelectors;+ swipeDragger+} = localSelectors-const ModisTrueColorLayerA = '#active-MODIS_Terra_CorrectedReflectance_TrueColor';-const ModisTrueColorLayerB = '#activeB-MODIS_Terra_CorrectedReflectance_TrueColor';-const toggleButton = '#toggleIconHolder';-const collapsedToggleButton = '#accordion-toggler-button';-const tooltipSelector = '.tooltip-inner';+const ModisTrueColorLayerA = '#active-MODIS_Terra_CorrectedReflectance_TrueColor'+const ModisTrueColorLayerB = '#activeB-MODIS_Terra_CorrectedReflectance_TrueColor'+const toggleButton = '#toggleIconHolder'+const collapsedToggleButton = '#accordion-toggler-button'+const tooltipSelector = '.tooltip-inner'-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {- before(c) {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ before (c) {+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},// load A|B and verify that it is active'A|B is loaded': (c) => {- c.url(c.globals.url + localQueryStrings.swipeAndAIsActive);- c.waitForElementVisible(swipeDragger, TIME_LIMIT);- c.pause(1000);+ c.url(c.globals.url + localQueryStrings.swipeAndAIsActive)+ c.waitForElementVisible(swipeDragger, TIME_LIMIT)+ c.pause(1000)},'Animation is disabled when compare mode active': (c) => {- const disableMessage = 'Animation feature is deactivated when Compare feature is active';- c.assert.hasClass(animationButtonCase, 'wv-disabled-button');- c.assert.attributeContains(animationButtonCase, 'aria-label', disableMessage);- c.moveToElement(animationButtonCase, 5, 5);+ const disableMessage = 'Animation feature is deactivated when Compare feature is active'+ c.assert.hasClass(animationButtonCase, 'wv-disabled-button')+ c.assert.attributeContains(animationButtonCase, 'aria-label', disableMessage)+ c.moveToElement(animationButtonCase, 5, 5)c.waitForElementVisible(tooltipSelector, TIME_LIMIT, (e) => {- c.assert.containsText(tooltipSelector, disableMessage);- });+ c.assert.containsText(tooltipSelector, disableMessage)+ })// Clicking does not activate animation- c.click(animationButtonCase);- c.expect.element(animationWidget).to.not.be.present;+ c.click(animationButtonCase)+ c.expect.element(animationWidget).to.not.be.present},'Image download is disabled when compare mode active': (c) => {- const disableMessage = 'You must exit comparison mode to use the snapshot feature';- c.assert.hasClass(snapshotToolbarButton, 'disabled');- c.assert.attributeContains(snapshotToolbarButton, 'aria-label', disableMessage);- c.click('#snapshot-btn-wrapper');+ const disableMessage = 'You must exit comparison mode to use the snapshot feature'+ c.assert.hasClass(snapshotToolbarButton, 'disabled')+ c.assert.attributeContains(snapshotToolbarButton, 'aria-label', disableMessage)+ c.click('#snapshot-btn-wrapper')c.waitForElementVisible(tooltipSelector, TIME_LIMIT, (e) => {- c.assert.containsText(tooltipSelector, disableMessage);- });+ c.assert.containsText(tooltipSelector, disableMessage)+ })// Clicking does not activate image download- c.click(snapshotToolbarButton);- c.pause(100);- c.expect.element('#wv-image-resolution').to.not.be.present;+ c.click(snapshotToolbarButton)+ c.pause(100)+ c.expect.element('#wv-image-resolution').to.not.be.present},'Data download is disabled when compare mode active': (c) => {- const disableMessage = 'You must exit comparison mode to download data';- c.assert.cssClassPresent(dataDownloadTabButton, 'disabled');- c.assert.attributeContains(dataDownloadTabButton, 'aria-label', disableMessage);- c.moveToElement('#download-sidebar-tab', 10, 10);+ const disableMessage = 'You must exit comparison mode to download data'+ c.assert.cssClassPresent(dataDownloadTabButton, 'disabled')+ c.assert.attributeContains(dataDownloadTabButton, 'aria-label', disableMessage)+ c.moveToElement('#download-sidebar-tab', 10, 10)c.waitForElementVisible(tooltipSelector, TIME_LIMIT, (e) => {- c.assert.containsText(tooltipSelector, disableMessage);- });+ c.assert.containsText(tooltipSelector, disableMessage)+ })// Clicking does not switch tabs- c.click(dataDownloadTabButton);- c.pause(100);- c.expect.element('#smart-handoff-side-panel').to.not.be.present;+ c.click(dataDownloadTabButton)+ c.pause(100)+ c.expect.element('#smart-handoff-side-panel').to.not.be.present},'Events disabled when compare mode active': (c) => {- const disableMessage = 'You must exit comparison mode to use the natural events feature';-- c.moveToElement(eventsSidebarTabButton, 1, 1);- c.click(eventsSidebarTabButton);- c.pause(100);- c.expect.element('#wv-eventscontent').to.not.be.present;- c.assert.cssClassPresent(eventsSidebarTabButton, 'disabled');- c.assert.attributeContains(eventsSidebarTabButton, 'aria-label', disableMessage);- c.moveToElement('#events-sidebar-tab', 10, 10);+ const disableMessage = 'You must exit comparison mode to use the natural events feature'++ c.moveToElement(eventsSidebarTabButton, 1, 1)+ c.click(eventsSidebarTabButton)+ c.pause(100)+ c.expect.element('#wv-eventscontent').to.not.be.present+ c.assert.cssClassPresent(eventsSidebarTabButton, 'disabled')+ c.assert.attributeContains(eventsSidebarTabButton, 'aria-label', disableMessage)+ c.moveToElement('#events-sidebar-tab', 10, 10)c.waitForElementVisible(tooltipSelector, TIME_LIMIT, (e) => {- c.assert.containsText(tooltipSelector, disableMessage);- });+ c.assert.containsText(tooltipSelector, disableMessage)+ })},'Removing layer removes correct layer from correct layer group': (c) => {- c.expect.element(ModisTrueColorLayerA).to.be.visible;- c.moveToElement(ModisTrueColorLayerA, 1, 1).pause(200);- c.click('#close-activeMODIS_Terra_CorrectedReflectance_TrueColor');- c.pause(100);- c.expect.element(ModisTrueColorLayerA).to.not.be.present;- c.expect.element(ModisTrueColorLayerB).to.not.be.present;- c.click(localSelectors.bTab);- c.waitForElementVisible(ModisTrueColorLayerB, TIME_LIMIT);+ c.expect.element(ModisTrueColorLayerA).to.be.visible+ c.moveToElement(ModisTrueColorLayerA, 1, 1).pause(200)+ c.click('#close-activeMODIS_Terra_CorrectedReflectance_TrueColor')+ c.pause(100)+ c.expect.element(ModisTrueColorLayerA).to.not.be.present+ c.expect.element(ModisTrueColorLayerB).to.not.be.present+ c.click(localSelectors.bTab)+ c.waitForElementVisible(ModisTrueColorLayerB, TIME_LIMIT)},/*** B state can layer list collapse*/'Collapse layer list with B state and test label shows correct number of layers': (c) => {- c.url(c.globals.url + localQueryStrings.spyAndBIsActive);+ c.url(c.globals.url + localQueryStrings.spyAndBIsActive)c.waitForElementVisible(toggleButton, TIME_LIMIT, () => {- c.expect.element(collapsedToggleButton).to.not.be.present;- c.click(toggleButton);- c.pause(100);- c.expect.element(collapsedToggleButton).to.be.present;- c.waitForElementNotPresent(toggleButton, TIME_LIMIT);- c.useCss().assert.containsText(`${collapsedToggleButton} .layer-count`, '6');- c.click(collapsedToggleButton);- c.pause(100);- c.waitForElementVisible('#activeB-Reference_Features_15m', TIME_LIMIT);- });+ c.expect.element(collapsedToggleButton).to.not.be.present+ c.click(toggleButton)+ c.pause(100)+ c.expect.element(collapsedToggleButton).to.be.present+ c.waitForElementNotPresent(toggleButton, TIME_LIMIT)+ c.useCss().assert.containsText(`${collapsedToggleButton} .layer-count`, '6')+ c.click(collapsedToggleButton)+ c.pause(100)+ c.waitForElementVisible('#activeB-Reference_Features_15m', TIME_LIMIT)+ })},/**@@ -124,43 +124,43 @@ module.exports = {*/'If you exit A|B with B selection active, the active state will then be the B state': (c) => {c.expect.element('#activeB-VIIRS_SNPP_CorrectedReflectance_TrueColor')- .to.be.visible;+ .to.be.visiblec.expect.element('#activeB-MODIS_Aqua_CorrectedReflectance_TrueColor')- .to.be.visible;+ .to.be.visible- c.moveToElement('#activeB-Reference_Labels_15m', 1, 1).pause(200);- c.click('#close-activeBReference_Labels_15m');+ c.moveToElement('#activeB-Reference_Labels_15m', 1, 1).pause(200)+ c.click('#close-activeBReference_Labels_15m')- c.moveToElement('#activeB-Reference_Features_15m', 1, 1).pause(200);- c.click('#close-activeBReference_Features_15m');+ c.moveToElement('#activeB-Reference_Features_15m', 1, 1).pause(200)+ c.click('#close-activeBReference_Features_15m')- c.moveToElement('#activeB-VIIRS_SNPP_CorrectedReflectance_TrueColor', 1, 1).pause(200);- c.click('#close-activeBVIIRS_SNPP_CorrectedReflectance_TrueColor');+ c.moveToElement('#activeB-VIIRS_SNPP_CorrectedReflectance_TrueColor', 1, 1).pause(200)+ c.click('#close-activeBVIIRS_SNPP_CorrectedReflectance_TrueColor')- c.moveToElement('#activeB-MODIS_Aqua_CorrectedReflectance_TrueColor', 1, 1).pause(200);- c.click('#close-activeBMODIS_Aqua_CorrectedReflectance_TrueColor');+ c.moveToElement('#activeB-MODIS_Aqua_CorrectedReflectance_TrueColor', 1, 1).pause(200)+ c.click('#close-activeBMODIS_Aqua_CorrectedReflectance_TrueColor')- c.pause(500);- c.click(localSelectors.compareButton);+ c.pause(500)+ c.click(localSelectors.compareButton)c.waitForElementNotPresent('.timeline-dragger.draggerA',TIME_LIMIT,() => {- c.expect.element('#activeB-Coastlines_15m').to.be.visible;+ c.expect.element('#activeB-Coastlines_15m').to.be.visiblec.expect.element(- '#activeB-MODIS_Terra_CorrectedReflectance_TrueColor',- ).to.be.visible;+ '#activeB-MODIS_Terra_CorrectedReflectance_TrueColor'+ ).to.be.visiblec.expect.element(- '#activeB-VIIRS_SNPP_CorrectedReflectance_TrueColor',- ).to.not.be.present;+ '#activeB-VIIRS_SNPP_CorrectedReflectance_TrueColor'+ ).to.not.be.presentc.expect.element(- '#activeB-MODIS_Aqua_CorrectedReflectance_TrueColor',- ).to.not.be.present;- },- );+ '#activeB-MODIS_Aqua_CorrectedReflectance_TrueColor'+ ).to.not.be.present+ }+ )},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/compare/layer-dialog-test.js b/e2e/features/compare/layer-dialog-test.jsindex 74ba9a7b0..471b69fc9 100644--- a/e2e/features/compare/layer-dialog-test.js+++ b/e2e/features/compare/layer-dialog-test.js@@ -1,75 +1,75 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');-const localQueryStrings = require('../../reuseables/querystrings.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')+const localQueryStrings = require('../../reuseables/querystrings.js')-const TIME_LIMIT = 20000;-const aerosolLayer = '#active-MODIS_Terra_Aerosol';-const AodOptionsPanelBody = '#layer_options_modal-modis_terra_aerosol .modal-body';-const AodOptionsPanelHeader = '#layer_options_modal-modis_terra_aerosol .modal-header';-const AodInfoPanel = '.layer_info_modal-modis_terra_aerosol';-const correctedReflectanceBLayer = '#activeB-MODIS_Terra_CorrectedReflectance_TrueColor';-const correctedReflectanceOptionsPanelHeader = '#layer_options_modal-modis_terra_correctedreflectance_truecolor .modal-header';-const correctedReflectanceOptionsPanelBody = '#layer_options_modal-modis_terra_correctedreflectance_truecolor .modal-body';-const correctedReflectanceInfoPanel = '#layer_info_modal-modis_terra_correctedreflectance_truecolor';+const TIME_LIMIT = 20000+const aerosolLayer = '#active-MODIS_Terra_Aerosol'+const AodOptionsPanelBody = '#layer_options_modal-modis_terra_aerosol .modal-body'+const AodOptionsPanelHeader = '#layer_options_modal-modis_terra_aerosol .modal-header'+const AodInfoPanel = '.layer_info_modal-modis_terra_aerosol'+const correctedReflectanceBLayer = '#activeB-MODIS_Terra_CorrectedReflectance_TrueColor'+const correctedReflectanceOptionsPanelHeader = '#layer_options_modal-modis_terra_correctedreflectance_truecolor .modal-header'+const correctedReflectanceOptionsPanelBody = '#layer_options_modal-modis_terra_correctedreflectance_truecolor .modal-body'+const correctedReflectanceInfoPanel = '#layer_info_modal-modis_terra_correctedreflectance_truecolor'module.exports = {- before(c) {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ before (c) {+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},'Layer option features work in A|B mode': (c) => {- c.url(c.globals.url + localQueryStrings.swipeAOD);- c.waitForElementVisible(aerosolLayer, TIME_LIMIT);- c.expect.element(AodOptionsPanelBody).to.not.be.present;- c.moveToElement(aerosolLayer, 0, 0).pause(200);- c.click(`${aerosolLayer} .wv-layers-options`);- c.waitForElementVisible('.layer-settings-modal', TIME_LIMIT);+ c.url(c.globals.url + localQueryStrings.swipeAOD)+ c.waitForElementVisible(aerosolLayer, TIME_LIMIT)+ c.expect.element(AodOptionsPanelBody).to.not.be.present+ c.moveToElement(aerosolLayer, 0, 0).pause(200)+ c.click(`${aerosolLayer} .wv-layers-options`)+ c.waitForElementVisible('.layer-settings-modal', TIME_LIMIT)c.assert.containsText(`${AodOptionsPanelHeader} .modal-title`,- 'Aerosol Optical Depth',- );+ 'Aerosol Optical Depth'+ )if (c.options.desiredCapabilities.browser !== 'ie') {c.expect.element(`${AodOptionsPanelBody} .wv-palette-selector`)- .to.be.visible;+ .to.be.visible}},'Layer info dialog works in A|B mode': (c) => {- c.click(`${AodOptionsPanelHeader} .close`).pause(1000);- c.moveToElement(aerosolLayer, 1, 1);- c.waitForElementVisible(`${aerosolLayer} .wv-layers-info`);- c.click(`${aerosolLayer} .wv-layers-info`);- c.waitForElementVisible(`${AodInfoPanel} .layer-description`, TIME_LIMIT);+ c.click(`${AodOptionsPanelHeader} .close`).pause(1000)+ c.moveToElement(aerosolLayer, 1, 1)+ c.waitForElementVisible(`${aerosolLayer} .wv-layers-info`)+ c.click(`${aerosolLayer} .wv-layers-info`)+ c.waitForElementVisible(`${AodInfoPanel} .layer-description`, TIME_LIMIT)c.assert.containsText(AodInfoPanel,- 'The Aerosol Optical Depth layer is useful for studying aerosol optical depth',- );+ 'The Aerosol Optical Depth layer is useful for studying aerosol optical depth'+ )},'expect clicking A|B button to close options dialog': (c) => {- c.click(`${AodInfoPanel} .close`).pause(500);- c.click(localSelectors.compareButton);+ c.click(`${AodInfoPanel} .close`).pause(500)+ c.click(localSelectors.compareButton)c.waitForElementVisible(aerosolLayer, TIME_LIMIT, () => {- c.expect.element(AodOptionsPanelBody).to.not.be.present;- });+ c.expect.element(AodOptionsPanelBody).to.not.be.present+ })},'Layer option features after exiting A|B mode': (c) => {- c.moveToElement(aerosolLayer, 1, 1).pause(200);- c.click(`${aerosolLayer} .wv-layers-options`);+ c.moveToElement(aerosolLayer, 1, 1).pause(200)+ c.click(`${aerosolLayer} .wv-layers-options`)c.waitForElementVisible(AodOptionsPanelBody, TIME_LIMIT, () => {c.useCss().assert.containsText(`${AodOptionsPanelHeader} .modal-title`,- 'Aerosol Optical Depth',- );+ 'Aerosol Optical Depth'+ )if (c.options.desiredCapabilities.browser !== 'ie') {c.expect.element(`${AodOptionsPanelBody} .wv-palette-selector`).to- .be.visible;+ .be.visible}- });+ })},'Layer info dialog works after exiting A|B mode': (c) => {- c.click(`${AodOptionsPanelHeader} .close`).pause(500);- c.moveToElement(aerosolLayer, 0, 0).pause(200);- c.click(`${aerosolLayer} .wv-layers-info`);+ c.click(`${AodOptionsPanelHeader} .close`).pause(500)+ c.moveToElement(aerosolLayer, 0, 0).pause(200)+ c.click(`${aerosolLayer} .wv-layers-info`)c.waitForElementVisible(`${AodInfoPanel} .layer-description`,TIME_LIMIT,@@ -78,47 +78,47 @@ module.exports = {.useCss().assert.containsText(AodInfoPanel,- 'The Aerosol Optical Depth layer is useful for studying aerosol optical depth',- );- },- );+ 'The Aerosol Optical Depth layer is useful for studying aerosol optical depth'+ )+ }+ )},- 'expect reactivating A|B to close options dialog and activate B state': function(- c,+ 'expect reactivating A|B to close options dialog and activate B state': function (+ c) {- c.click(`${AodInfoPanel} .close`).pause(500);- c.moveToElement(aerosolLayer, 1, 1).pause(200);- c.click(`${aerosolLayer} .wv-layers-options`).pause(500);- c.click(`${AodOptionsPanelHeader} .close`).pause(500);- c.click(localSelectors.compareButton);+ c.click(`${AodInfoPanel} .close`).pause(500)+ c.moveToElement(aerosolLayer, 1, 1).pause(200)+ c.click(`${aerosolLayer} .wv-layers-options`).pause(500)+ c.click(`${AodOptionsPanelHeader} .close`).pause(500)+ c.click(localSelectors.compareButton)c.waitForElementVisible(aerosolLayer, TIME_LIMIT, () => {- c.pause(500);- c.expect.element(AodOptionsPanelBody).to.not.be.present;- c.click(localSelectors.bTab);- });+ c.pause(500)+ c.expect.element(AodOptionsPanelBody).to.not.be.present+ c.click(localSelectors.bTab)+ })},'Layer option features work in B state': (c) => {- c.waitForElementVisible(correctedReflectanceBLayer, TIME_LIMIT);- c.expect.element(AodOptionsPanelBody).to.not.be.present;- c.moveToElement(correctedReflectanceBLayer, 1, 1).pause(200);- c.click(`${correctedReflectanceBLayer} .wv-layers-options`);- c.waitForElementVisible('.layer-settings-modal', TIME_LIMIT);+ c.waitForElementVisible(correctedReflectanceBLayer, TIME_LIMIT)+ c.expect.element(AodOptionsPanelBody).to.not.be.present+ c.moveToElement(correctedReflectanceBLayer, 1, 1).pause(200)+ c.click(`${correctedReflectanceBLayer} .wv-layers-options`)+ c.waitForElementVisible('.layer-settings-modal', TIME_LIMIT)c.assert.containsText(`${correctedReflectanceOptionsPanelHeader} .modal-title`,- 'Corrected Reflectance (True Color)',- );+ 'Corrected Reflectance (True Color)'+ )if (c.options.desiredCapabilities.browser !== 'ie') {c.expect.element(- `${correctedReflectanceOptionsPanelBody} .wv-palette-selector`,- ).to.not.be.present;+ `${correctedReflectanceOptionsPanelBody} .wv-palette-selector`+ ).to.not.be.present}},'Layer info dialog works after clicking into B mode': (c) => {- c.click(`${correctedReflectanceOptionsPanelHeader} .close`);- c.waitForElementNotPresent('#layer_options_modal-modis_terra_correctedreflectance_truecolor .modal-header', TIME_LIMIT);- c.moveToElement(correctedReflectanceBLayer, 0, 0).pause(200);- c.click(`${correctedReflectanceBLayer} .wv-layers-info`);- c.pause(500);+ c.click(`${correctedReflectanceOptionsPanelHeader} .close`)+ c.waitForElementNotPresent('#layer_options_modal-modis_terra_correctedreflectance_truecolor .modal-header', TIME_LIMIT)+ c.moveToElement(correctedReflectanceBLayer, 0, 0).pause(200)+ c.click(`${correctedReflectanceBLayer} .wv-layers-info`)+ c.pause(500)c.waitForElementVisible(`${correctedReflectanceInfoPanel} .layer-metadata`,TIME_LIMIT,@@ -127,12 +127,12 @@ module.exports = {.useCss().assert.containsText(correctedReflectanceInfoPanel,- 'These images are called true-color or natural color because this combination of wavelengths is similar to what the human eye',- );- },- );- },- after(c) {- c.end();+ 'These images are called true-color or natural color because this combination of wavelengths is similar to what the human eye'+ )+ }+ )},-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/compare/layer-sidebar-test.js b/e2e/features/compare/layer-sidebar-test.jsindex af6db7c8c..4aa182554 100644--- a/e2e/features/compare/layer-sidebar-test.js+++ b/e2e/features/compare/layer-sidebar-test.js@@ -1,66 +1,66 @@-const reuseables = require('../../reuseables/skip-tour.js');-const selectors = require('../../reuseables/selectors.js');-const localQueryStrings = require('../../reuseables/querystrings.js');+const reuseables = require('../../reuseables/skip-tour.js')+const selectors = require('../../reuseables/selectors.js')+const localQueryStrings = require('../../reuseables/querystrings.js')-const aodChoices = '#accordion-legacy-all-aerosol-optical-depth .measure-row-contents';-const aodCombinedValueId = 'MODIS_Combined_Value_Added_AOD';-const aodMAIACId = 'MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth';-const aodCheckBox = '#MODIS_Combined_Value_Added_AOD-checkbox';-const aodMAIACCheckbox = '#checkbox-case-MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth .wv-checkbox input';-const TIME_LIMIT = 10000;+const aodChoices = '#accordion-legacy-all-aerosol-optical-depth .measure-row-contents'+const aodCombinedValueId = 'MODIS_Combined_Value_Added_AOD'+const aodMAIACId = 'MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth'+const aodCheckBox = '#MODIS_Combined_Value_Added_AOD-checkbox'+const aodMAIACCheckbox = '#checkbox-case-MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth .wv-checkbox input'+const TIME_LIMIT = 10000module.exports = {before: (c) => {- reuseables.loadAndSkipTour(c, c.globals.timeout);+ reuseables.loadAndSkipTour(c, c.globals.timeout)},'Add AOD Layer to Layer Group A': (c) => {- c.url(c.globals.url + localQueryStrings.swipeAndAIsActive);- c.waitForElementVisible(selectors.swipeDragger, c.globals.timeout);- c.click(selectors.addLayers);- c.waitForElementVisible(selectors.aerosolOpticalDepth, c.globals.timeout);- c.click(selectors.aerosolOpticalDepth);+ c.url(c.globals.url + localQueryStrings.swipeAndAIsActive)+ c.waitForElementVisible(selectors.swipeDragger, c.globals.timeout)+ c.click(selectors.addLayers)+ c.waitForElementVisible(selectors.aerosolOpticalDepth, c.globals.timeout)+ c.click(selectors.aerosolOpticalDepth)- c.waitForElementVisible(aodChoices, TIME_LIMIT);- c.click(aodCheckBox);- c.waitForElementVisible(`#active-${aodCombinedValueId}`, c.globals.timeout);- c.click(selectors.layersModalCloseButton);- c.waitForElementNotPresent('#layer_picker_component', TIME_LIMIT);- c.pause(250);+ c.waitForElementVisible(aodChoices, TIME_LIMIT)+ c.click(aodCheckBox)+ c.waitForElementVisible(`#active-${aodCombinedValueId}`, c.globals.timeout)+ c.click(selectors.layersModalCloseButton)+ c.waitForElementNotPresent('#layer_picker_component', TIME_LIMIT)+ c.pause(250)},'Toggle compare mode to Active state B': (c) => {- c.click(`${selectors.bTab} .productsIcon`);- c.waitForElementVisible('#activeB-Coastlines_15m', c.globals.timeout);+ c.click(`${selectors.bTab} .productsIcon`)+ c.waitForElementVisible('#activeB-Coastlines_15m', c.globals.timeout)},'Verify that AOD layer is not visible': (c) => {- c.expect.element(`#active-${aodCombinedValueId}`).to.not.be.present;+ c.expect.element(`#active-${aodCombinedValueId}`).to.not.be.present},'Add AOD index layer to Active state B and verify it has been added': (c) => {- c.click(selectors.addLayers);- c.waitForElementVisible(aodChoices, c.globals.timeout);- c.click(aodMAIACCheckbox);+ c.click(selectors.addLayers)+ c.waitForElementVisible(aodChoices, c.globals.timeout)+ c.click(aodMAIACCheckbox)c.waitForElementVisible('#activeB-MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth',- c.globals.timeout,- );- c.expect.element(`#activeB-${aodCombinedValueId}`).to.not.be.present;- c.expect.element(`#active-${aodCombinedValueId}`).to.not.be.present;+ c.globals.timeout+ )+ c.expect.element(`#activeB-${aodCombinedValueId}`).to.not.be.present+ c.expect.element(`#active-${aodCombinedValueId}`).to.not.be.present},- 'Verify that AOD combined is visible and AOD index is not present in Layer list A': function(- c,+ 'Verify that AOD combined is visible and AOD index is not present in Layer list A': function (+ c) {- c.click(selectors.layersModalCloseButton);- c.pause(100);- c.click(selectors.aTab);+ c.click(selectors.layersModalCloseButton)+ c.pause(100)+ c.click(selectors.aTab)c.waitForElementVisible(`#active-${aodCombinedValueId}`,c.globals.timeout,() => {- c.expect.element(`#activeB-${aodCombinedValueId}`).to.not.be.present;- c.expect.element(`#activeA-${aodMAIACId}`).to.not.be.present;- },- );- },- after(c) {- c.end();+ c.expect.element(`#activeB-${aodCombinedValueId}`).to.not.be.present+ c.expect.element(`#activeA-${aodMAIACId}`).to.not.be.present+ }+ )},-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/compare/permalinks-test.js b/e2e/features/compare/permalinks-test.jsindex 820254608..aebb186c2 100644--- a/e2e/features/compare/permalinks-test.js+++ b/e2e/features/compare/permalinks-test.js@@ -1,88 +1,88 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');-const localQueryStrings = require('../../reuseables/querystrings.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')+const localQueryStrings = require('../../reuseables/querystrings.js')-const TIME_LIMIT = 20000;+const TIME_LIMIT = 20000module.exports = {- before(client) {- reuseables.loadAndSkipTour(client, TIME_LIMIT);+ before (client) {+ reuseables.loadAndSkipTour(client, TIME_LIMIT)},/*** Ensure that page loads with correct A|B mode, A|B state, and* date with given queryString*/- 'Swipe mode and A|B state A are active and date is correct': function(- client,+ 'Swipe mode and A|B state A are active and date is correct': function (+ client) {- client.url(client.globals.url + localQueryStrings.swipeAndAIsActive);+ client.url(client.globals.url + localQueryStrings.swipeAndAIsActive)client.waitForElementVisible(localSelectors.swipeDragger,TIME_LIMIT,() => {- client.expect.element(localSelectors.swipeButton).to.not.be.enabled;- client.assert.cssClassPresent(localSelectors.aTab, 'active');+ client.expect.element(localSelectors.swipeButton).to.not.be.enabled+ client.assert.cssClassPresent(localSelectors.aTab, 'active')client.useCss()- .assert.containsText(localSelectors.aTab, 'A: 2018 AUG 17');- },- );+ .assert.containsText(localSelectors.aTab, 'A: 2018 AUG 17')+ }+ )},- 'Opacity mode and A|B state B are active and date is correct': function(- client,+ 'Opacity mode and A|B state B are active and date is correct': function (+ client) {- client.url(client.globals.url + localQueryStrings.opacityAndBIsActive);+ client.url(client.globals.url + localQueryStrings.opacityAndBIsActive)client.waitForElementVisible('#ab-slider-case', TIME_LIMIT, () => {- client.expect.element(localSelectors.opacityButton).to.not.be.enabled;- client.assert.cssClassPresent(localSelectors.bTab, 'active');- client.useCss().assert.containsText(localSelectors.bTab, 'B: 2018 AUG 16');- });+ client.expect.element(localSelectors.opacityButton).to.not.be.enabled+ client.assert.cssClassPresent(localSelectors.bTab, 'active')+ client.useCss().assert.containsText(localSelectors.bTab, 'B: 2018 AUG 16')+ })},- 'Spy mode is active in B state': function(client) {- client.url(client.globals.url + localQueryStrings.spyAndBIsActive);+ 'Spy mode is active in B state': function (client) {+ client.url(client.globals.url + localQueryStrings.spyAndBIsActive)client.waitForElementPresent('.ab-spy-span', TIME_LIMIT, () => {- client.expect.element(localSelectors.spyButton).to.not.be.enabled;- client.assert.cssClassPresent(localSelectors.bTab, 'active');- client.useCss().assert.containsText(localSelectors.bTab, 'B: 2018 AUG 16');- });+ client.expect.element(localSelectors.spyButton).to.not.be.enabled+ client.assert.cssClassPresent(localSelectors.bTab, 'active')+ client.useCss().assert.containsText(localSelectors.bTab, 'B: 2018 AUG 16')+ })},/*** Ensure that A|B state loads with correct layers given permalink*/- 'A|B loaded with one only layer in A section -- Corrected Reflectance (True Color)': function(- client,+ 'A|B loaded with one only layer in A section -- Corrected Reflectance (True Color)': function (+ client) {- client.url(client.globals.url + localQueryStrings.swipeAndAIsActive);+ client.url(client.globals.url + localQueryStrings.swipeAndAIsActive)client.waitForElementPresent(localSelectors.aTab, TIME_LIMIT, () => {client.expect.element(- '.ab-tabs-case .tab-pane.active ul#overlays .item',- ).to.not.be.present;+ '.ab-tabs-case .tab-pane.active ul#overlays .item'+ ).to.not.be.presentclient.expect.element(- '#active-MODIS_Terra_CorrectedReflectance_TrueColor',- ).to.be.visible;- });+ '#active-MODIS_Terra_CorrectedReflectance_TrueColor'+ ).to.be.visible+ })},- 'Click B tab to ensure that loaded layers are correct': function(client) {- client.click(localSelectors.bTab);+ 'Click B tab to ensure that loaded layers are correct': function (client) {+ client.click(localSelectors.bTab)client.waitForElementVisible('#activeB-Coastlines_15m', TIME_LIMIT, () => {client.expect.element(- '#activeB-MODIS_Aqua_CorrectedReflectance_TrueColor.layer-hidden',- ).to.be.visible;+ '#activeB-MODIS_Aqua_CorrectedReflectance_TrueColor.layer-hidden'+ ).to.be.visibleclient.expect.element(- '#activeB-VIIRS_SNPP_CorrectedReflectance_TrueColor.layer-hidden',- ).to.be.visible;+ '#activeB-VIIRS_SNPP_CorrectedReflectance_TrueColor.layer-hidden'+ ).to.be.visibleclient.expect.element(- '#activeB-Reference_Labels_15m.layer-hidden',- ).to.be.visible;+ '#activeB-Reference_Labels_15m.layer-hidden'+ ).to.be.visibleclient.expect.element(- '#activeB-Reference_Features_15m.layer-hidden',- ).to.be.visible;- client.expect.element('#activeB-Coastlines_15m.layer-visible').to.be.visible;+ '#activeB-Reference_Features_15m.layer-hidden'+ ).to.be.visible+ client.expect.element('#activeB-Coastlines_15m.layer-visible').to.be.visibleclient.expect.element(- '#activeB-MODIS_Terra_CorrectedReflectance_TrueColor.layer-visible',- ).to.be.visible;- });+ '#activeB-MODIS_Terra_CorrectedReflectance_TrueColor.layer-visible'+ ).to.be.visible+ })},- after(client) {- client.end();- },-};+ after (client) {+ client.end()+ }+}diff --git a/e2e/features/compare/timeline-test.js b/e2e/features/compare/timeline-test.jsindex 7ff56d477..da587320a 100644--- a/e2e/features/compare/timeline-test.js+++ b/e2e/features/compare/timeline-test.js@@ -1,73 +1,73 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');-const localQueryStrings = require('../../reuseables/querystrings.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')+const localQueryStrings = require('../../reuseables/querystrings.js')-const draggerA = '.timeline-dragger.draggerA ';-const draggerB = '.timeline-dragger.draggerB ';-const dateSelectorDayInput = '#date-selector-main .input-wrapper-day input';-const dateSelectorMonthInput = '#date-selector-main .input-wrapper-month input';-const TIME_LIMIT = 20000;+const draggerA = '.timeline-dragger.draggerA '+const draggerB = '.timeline-dragger.draggerB '+const dateSelectorDayInput = '#date-selector-main .input-wrapper-day input'+const dateSelectorMonthInput = '#date-selector-main .input-wrapper-month input'+const TIME_LIMIT = 20000module.exports = {- before(c) {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ before (c) {+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},// load A|B and verify that it is active- 'A|B is loaded': function(c) {- c.url(c.globals.url + localQueryStrings.swipeAndAIsActive);- c.waitForElementVisible(localSelectors.swipeDragger, TIME_LIMIT);+ 'A|B is loaded': function (c) {+ c.url(c.globals.url + localQueryStrings.swipeAndAIsActive)+ c.waitForElementVisible(localSelectors.swipeDragger, TIME_LIMIT)},- 'Verify that A|B draggers are visible': function(c) {- c.expect.element(draggerA).to.be.visible;- c.expect.element(draggerB).to.be.visible;+ 'Verify that A|B draggers are visible': function (c) {+ c.expect.element(draggerA).to.be.visible+ c.expect.element(draggerB).to.be.visible},- 'Dragging active dragger updates date': function(c) {- c.assert.attributeContains(dateSelectorDayInput, 'value', '17');- c.assert.attributeContains(dateSelectorMonthInput, 'value', 'AUG');- c.perform(function() {- const actions = this.actions({ async: true });- const dragA = c.findElement(draggerA);- return actions.dragAndDrop(dragA, { x: 100, y: 0 });- });+ 'Dragging active dragger updates date': function (c) {+ c.assert.attributeContains(dateSelectorDayInput, 'value', '17')+ c.assert.attributeContains(dateSelectorMonthInput, 'value', 'AUG')+ c.perform(function () {+ const actions = this.actions({ async: true })+ const dragA = c.findElement(draggerA)+ return actions.dragAndDrop(dragA, { x: 100, y: 0 })+ })c.getValue(dateSelectorDayInput, (dayResult) => {- c.getValue(dateSelectorMonthInput, function(monthResult) {- const result = monthResult.value.concat(dayResult.value);- this.assert.notEqual('AUG17', result);- });- });+ c.getValue(dateSelectorMonthInput, function (monthResult) {+ const result = monthResult.value.concat(dayResult.value)+ this.assert.notEqual('AUG17', result)+ })+ })},- 'Clicking inactive dragger updates active state': function(c) {- c.assert.hasClass(localSelectors.aTab, 'active');- c.perform(function() {- const actions = this.actions({ async: true });- const dragB = c.findElement(draggerB);+ 'Clicking inactive dragger updates active state': function (c) {+ c.assert.hasClass(localSelectors.aTab, 'active')+ c.perform(function () {+ const actions = this.actions({ async: true })+ const dragB = c.findElement(draggerB)return actions.move({ origin: dragB })- .click(dragB);- });+ .click(dragB)+ })// Reference labels were not active in A but are in Bc.waitForElementVisible('#activeB-Reference_Features_15m',TIME_LIMIT,() => {- c.assert.attributeContains(dateSelectorDayInput, 'value', '16');- },- );+ c.assert.attributeContains(dateSelectorDayInput, 'value', '16')+ }+ )},- 'Dragging B dragger updates date in label': function(c) {- c.useCss().assert.textContains(localSelectors.bTab, '2018 AUG 16');- c.perform(function() {- const actions = this.actions({ async: true });- const dragB = c.findElement(draggerB);+ 'Dragging B dragger updates date in label': function (c) {+ c.useCss().assert.textContains(localSelectors.bTab, '2018 AUG 16')+ c.perform(function () {+ const actions = this.actions({ async: true })+ const dragB = c.findElement(draggerB)- return actions.dragAndDrop(dragB, { x: 100, y: 0 });- });- c.getText(localSelectors.bTab, function(result) {- this.assert.notEqual('B: 2018 AUG 16', result.value);- });+ return actions.dragAndDrop(dragB, { x: 100, y: 0 })+ })+ c.getText(localSelectors.bTab, function (result) {+ this.assert.notEqual('B: 2018 AUG 16', result.value)+ })},- 'Deactivate A|B is no longer active': function(c) {- c.click(localSelectors.compareButton);+ 'Deactivate A|B is no longer active': function (c) {+ c.click(localSelectors.compareButton)c.waitForElementNotPresent(localSelectors.bTab,TIME_LIMIT,@@ -76,14 +76,14 @@ module.exports = {.useCss().assert.textContains(localSelectors.compareButton,- 'Start Comparison',- );- c.expect.element(draggerA).to.not.be.present;- c.expect.element(draggerB).to.be.visible;- },- );+ 'Start Comparison'+ )+ c.expect.element(draggerA).to.not.be.present+ c.expect.element(draggerB).to.be.visible+ }+ )},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/events/event-filter-test.js b/e2e/features/events/event-filter-test.jsindex 8ca8e8c59..df25d6c74 100644--- a/e2e/features/events/event-filter-test.js+++ b/e2e/features/events/event-filter-test.js@@ -1,235 +1,234 @@-const reuseables = require('../../reuseables/skip-tour.js');-const { switchProjection } = require('../../reuseables/switch-projection');+const reuseables = require('../../reuseables/skip-tour.js')+const { switchProjection } = require('../../reuseables/switch-projection')const {fixedAppNow,wildfiresWithDates,- backwardsCompatibleEventUrl,-} = require('../../reuseables/querystrings.js');--const TIME_LIMIT = 10000;-const layersTab = '#layers-sidebar-tab';-const eventsTab = '#events-sidebar-tab';-const filterIcons = '.filter-icons > .event-icon';-const dustHazeIcon = '.filter-icons > #filter-dust-and-haze';-const volcanoesIcon = '.filter-icons > #filter-volcanoes';-const wildfiresIcon = '.filter-icons > #filter-wildfires';-const filterDates = '.filter-dates';-const filterButton = '#event-filter-button';-const filterModal = '.event-filter-modal';-const filterModalApply = '#filter-apply-btn';-const filterModalCancel = '#filter-cancel-btn';-const eventList = '.wv-eventslist';+ backwardsCompatibleEventUrl+} = require('../../reuseables/querystrings.js')++const TIME_LIMIT = 10000+const layersTab = '#layers-sidebar-tab'+const eventsTab = '#events-sidebar-tab'+const filterIcons = '.filter-icons > .event-icon'+const dustHazeIcon = '.filter-icons > #filter-dust-and-haze'+const volcanoesIcon = '.filter-icons > #filter-volcanoes'+const wildfiresIcon = '.filter-icons > #filter-wildfires'+const filterDates = '.filter-dates'+const filterButton = '#event-filter-button'+const filterModal = '.event-filter-modal'+const filterModalApply = '#filter-apply-btn'+const filterModalCancel = '#filter-cancel-btn'+const eventList = '.wv-eventslist'const startInput = {year: '#year-event-filter-start',month: '#month-event-filter-start',- day: '#day-event-filter-start',-};+ day: '#day-event-filter-start'+}const endInput = {year: '#year-event-filter-end',month: '#month-event-filter-end',- day: '#day-event-filter-end',-};-const dustSwitch = '#dustHaze-switch';-const manmadeSwitch = '#manmade-switch';-const seaLakeIceSwitch = '#seaLakeIce-switch';-const severeStormsSwitch = '#severeStorms-switch';-const snowSwitch = '#snow-switch';-const volcanoesSwitch = '#volcanoes-switch';-const watercolorSwitch = '#waterColor-switch';-const wildfiresSwitch = '#wildfires-switch';-const mapExtentFilterCheckbox = '#map-extent-filter';--const getSwitchToggle = (inputId) => `${inputId} + .react-switch-label`;+ day: '#day-event-filter-end'+}+const dustSwitch = '#dustHaze-switch'+const manmadeSwitch = '#manmade-switch'+const seaLakeIceSwitch = '#seaLakeIce-switch'+const severeStormsSwitch = '#severeStorms-switch'+const snowSwitch = '#snow-switch'+const volcanoesSwitch = '#volcanoes-switch'+const watercolorSwitch = '#waterColor-switch'+const wildfiresSwitch = '#wildfires-switch'+const mapExtentFilterCheckbox = '#map-extent-filter'++const getSwitchToggle = (inputId) => `${inputId} + .react-switch-label`const openFilterModal = (c) => {- c.waitForElementVisible(eventList, TIME_LIMIT);- c.click(filterButton);- c.waitForElementVisible(filterModal, TIME_LIMIT);-};+ c.waitForElementVisible(eventList, TIME_LIMIT)+ c.click(filterButton)+ c.waitForElementVisible(filterModal, TIME_LIMIT)+}const assertDateInputValues = (c, start, end) => {- const [startYear, startMonth, startDay] = start.split('-');- const [endYear, endMonth, endDay] = end.split('-');- c.assert.value(startInput.year, startYear);- c.assert.value(startInput.month, startMonth);- c.assert.value(startInput.day, startDay);- c.assert.value(endInput.year, endYear);- c.assert.value(endInput.month, endMonth);- c.assert.value(endInput.day, endDay);-};+ const [startYear, startMonth, startDay] = start.split('-')+ const [endYear, endMonth, endDay] = end.split('-')+ c.assert.value(startInput.year, startYear)+ c.assert.value(startInput.month, startMonth)+ c.assert.value(startInput.day, startDay)+ c.assert.value(endInput.year, endYear)+ c.assert.value(endInput.month, endMonth)+ c.assert.value(endInput.day, endDay)+}module.exports = {- before(c) {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ before (c) {+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},'Default filtering includes last 120 days and all categories': (c) => {- c.url(c.globals.url + fixedAppNow);- c.waitForElementVisible(layersTab, TIME_LIMIT);- c.click(eventsTab);- c.expect.elements(filterIcons).count.to.equal(8);+ c.url(c.globals.url + fixedAppNow)+ c.waitForElementVisible(layersTab, TIME_LIMIT)+ c.click(eventsTab)+ c.expect.elements(filterIcons).count.to.equal(8)// Print dates to log for debugging purposes- c.getElementProperty(filterDates, 'innerText', function(result) {- console.log('result', result);- });+ c.getElementProperty(filterDates, 'innerText', function (result) {+ console.log('result', result)+ })- c.assert.containsText(filterDates, '2011 SEP 02 - 2011 DEC 31');+ c.assert.containsText(filterDates, '2011 SEP 02 - 2011 DEC 31')},'Filter modal inputs are correct': (c) => {- c.pause(3000);- c.click(filterButton);- c.waitForElementVisible(filterModal, TIME_LIMIT);- assertDateInputValues(c, '2011-SEP-02', '2011-DEC-31');- c.expect.element(dustSwitch).to.be.selected;- c.expect.element(manmadeSwitch).to.be.selected;- c.expect.element(seaLakeIceSwitch).to.be.selected;- c.expect.element(severeStormsSwitch).to.be.selected;- c.expect.element(snowSwitch).to.be.selected;- c.expect.element(volcanoesSwitch).to.be.selected;- c.expect.element(watercolorSwitch).to.be.selected;- c.expect.element(wildfiresSwitch).to.be.selected;- c.expect.element(mapExtentFilterCheckbox).to.not.be.selected;+ c.pause(3000)+ c.click(filterButton)+ c.waitForElementVisible(filterModal, TIME_LIMIT)+ assertDateInputValues(c, '2011-SEP-02', '2011-DEC-31')+ c.expect.element(dustSwitch).to.be.selected+ c.expect.element(manmadeSwitch).to.be.selected+ c.expect.element(seaLakeIceSwitch).to.be.selected+ c.expect.element(severeStormsSwitch).to.be.selected+ c.expect.element(snowSwitch).to.be.selected+ c.expect.element(volcanoesSwitch).to.be.selected+ c.expect.element(watercolorSwitch).to.be.selected+ c.expect.element(wildfiresSwitch).to.be.selected+ c.expect.element(mapExtentFilterCheckbox).to.not.be.selected},'URL params for categories, dates, and extent filtering are present': (c) => {- c.assert.urlParameterEquals('e', 'true');- c.assert.urlParameterEquals('efc', 'dustHaze,manmade,seaLakeIce,severeStorms,snow,volcanoes,waterColor,wildfires');- c.assert.urlParameterEquals('efd', '2011-09-02,2011-12-31');- c.assert.urlParameterEquals('efs', 'true');+ c.assert.urlParameterEquals('e', 'true')+ c.assert.urlParameterEquals('efc', 'dustHaze,manmade,seaLakeIce,severeStorms,snow,volcanoes,waterColor,wildfires')+ c.assert.urlParameterEquals('efd', '2011-09-02,2011-12-31')+ c.assert.urlParameterEquals('efs', 'true')},'Loading from permalink sets all criteria properly': (c) => {- c.url(c.globals.url + wildfiresWithDates);- c.assert.urlParameterEquals('e', 'true');- c.assert.urlParameterEquals('efc', 'wildfires');- c.assert.urlParameterEquals('efd', '2020-01-16,2020-06-16');- c.assert.urlParameterEquals('efs', 'false');+ c.url(c.globals.url + wildfiresWithDates)+ c.assert.urlParameterEquals('e', 'true')+ c.assert.urlParameterEquals('efc', 'wildfires')+ c.assert.urlParameterEquals('efd', '2020-01-16,2020-06-16')+ c.assert.urlParameterEquals('efs', 'false')// Check filter criteria summary in sidebar- c.expect.elements(filterIcons).count.to.equal(1);- c.expect.element(wildfiresIcon).to.be.present;- c.assert.containsText(filterDates, '2020 JAN 16 - 2020 JUN 16');- c.waitForElementVisible(eventList, TIME_LIMIT);+ c.expect.elements(filterIcons).count.to.equal(1)+ c.expect.element(wildfiresIcon).to.be.present+ c.assert.containsText(filterDates, '2020 JAN 16 - 2020 JUN 16')+ c.waitForElementVisible(eventList, TIME_LIMIT)// Check filter modal- c.click(filterButton);- c.waitForElementVisible(filterModal, TIME_LIMIT);- assertDateInputValues(c, '2020-JAN-16', '2020-JUN-16');- c.expect.element(dustSwitch).to.not.be.selected;- c.expect.element(manmadeSwitch).to.not.be.selected;- c.expect.element(seaLakeIceSwitch).to.not.be.selected;- c.expect.element(severeStormsSwitch).to.not.be.selected;- c.expect.element(snowSwitch).to.not.be.selected;- c.expect.element(volcanoesSwitch).to.not.be.selected;- c.expect.element(watercolorSwitch).to.not.be.selected;- c.expect.element(wildfiresSwitch).to.be.selected;- c.expect.element(mapExtentFilterCheckbox).to.be.selected;+ c.click(filterButton)+ c.waitForElementVisible(filterModal, TIME_LIMIT)+ assertDateInputValues(c, '2020-JAN-16', '2020-JUN-16')+ c.expect.element(dustSwitch).to.not.be.selected+ c.expect.element(manmadeSwitch).to.not.be.selected+ c.expect.element(seaLakeIceSwitch).to.not.be.selected+ c.expect.element(severeStormsSwitch).to.not.be.selected+ c.expect.element(snowSwitch).to.not.be.selected+ c.expect.element(volcanoesSwitch).to.not.be.selected+ c.expect.element(watercolorSwitch).to.not.be.selected+ c.expect.element(wildfiresSwitch).to.be.selected+ c.expect.element(mapExtentFilterCheckbox).to.be.selected},'Changing criteria in modal DOES NOT update summary of criteria in sidebar on CANCEL': (c) => {- c.url(c.globals.url + wildfiresWithDates);- openFilterModal(c);- c.click(startInput.year).sendKeys(startInput.year, 2000);- c.click(startInput.month).sendKeys(startInput.month, 'APR');- c.click(startInput.day).sendKeys(startInput.day, 19);- c.click(endInput.year).sendKeys(endInput.year, 2001);- c.click(endInput.month).sendKeys(endInput.month, 'NOV');- c.click(endInput.day).sendKeys(endInput.day, 11);- c.click(getSwitchToggle(wildfiresSwitch)); // OFF- c.pause(250);- c.click(getSwitchToggle(dustSwitch)); // ON- c.pause(250);- c.click(getSwitchToggle(volcanoesSwitch)); // ON- c.pause(250);- c.click(mapExtentFilterCheckbox); // OFF+ c.url(c.globals.url + wildfiresWithDates)+ openFilterModal(c)+ c.click(startInput.year).sendKeys(startInput.year, 2000)+ c.click(startInput.month).sendKeys(startInput.month, 'APR')+ c.click(startInput.day).sendKeys(startInput.day, 19)+ c.click(endInput.year).sendKeys(endInput.year, 2001)+ c.click(endInput.month).sendKeys(endInput.month, 'NOV')+ c.click(endInput.day).sendKeys(endInput.day, 11)+ c.click(getSwitchToggle(wildfiresSwitch)) // OFF+ c.pause(250)+ c.click(getSwitchToggle(dustSwitch)) // ON+ c.pause(250)+ c.click(getSwitchToggle(volcanoesSwitch)) // ON+ c.pause(250)+ c.click(mapExtentFilterCheckbox) // OFF// Cancel- c.click(filterModalCancel);+ c.click(filterModalCancel)// assert sidebar values- c.assert.containsText(filterDates, '2020 JAN 16 - 2020 JUN 16');- c.expect.elements(filterIcons).count.to.equal(1);- c.expect.element(wildfiresIcon).to.be.present; // ON+ c.assert.containsText(filterDates, '2020 JAN 16 - 2020 JUN 16')+ c.expect.elements(filterIcons).count.to.equal(1)+ c.expect.element(wildfiresIcon).to.be.present // ON},'Opening modal after cancelling changed values shows previous unchanged values': (c) => {- openFilterModal(c);- assertDateInputValues(c, '2020-JAN-16', '2020-JUN-16');- c.expect.element(dustSwitch).to.not.be.selected;- c.expect.element(manmadeSwitch).to.not.be.selected;- c.expect.element(seaLakeIceSwitch).to.not.be.selected;- c.expect.element(snowSwitch).to.not.be.selected;- c.expect.element(volcanoesSwitch).to.not.be.selected;- c.expect.element(watercolorSwitch).to.not.be.selected;- c.expect.element(wildfiresSwitch).to.be.selected; // ON- c.expect.element(mapExtentFilterCheckbox).to.be.selected;+ openFilterModal(c)+ assertDateInputValues(c, '2020-JAN-16', '2020-JUN-16')+ c.expect.element(dustSwitch).to.not.be.selected+ c.expect.element(manmadeSwitch).to.not.be.selected+ c.expect.element(seaLakeIceSwitch).to.not.be.selected+ c.expect.element(snowSwitch).to.not.be.selected+ c.expect.element(volcanoesSwitch).to.not.be.selected+ c.expect.element(watercolorSwitch).to.not.be.selected+ c.expect.element(wildfiresSwitch).to.be.selected // ON+ c.expect.element(mapExtentFilterCheckbox).to.be.selected},'Changing criteria in modal DOES update summary of criteria in sidebar on APPLY': (c) => {- c.click(startInput.year).sendKeys(startInput.year, 2000);- c.click(startInput.month).sendKeys(startInput.month, 'APR');- c.click(startInput.day).sendKeys(startInput.day, 19);- c.click(endInput.year).sendKeys(endInput.year, 2001);- c.click(endInput.month).sendKeys(endInput.month, 'NOV');- c.click(endInput.day).sendKeys(endInput.day, 11);- c.click(getSwitchToggle(wildfiresSwitch)); // OFF- c.pause(250);- c.click(getSwitchToggle(dustSwitch)); // ON- c.pause(250);- c.click(getSwitchToggle(volcanoesSwitch)); // ON- c.pause(250);- c.click(mapExtentFilterCheckbox); // OFF-+ c.click(startInput.year).sendKeys(startInput.year, 2000)+ c.click(startInput.month).sendKeys(startInput.month, 'APR')+ c.click(startInput.day).sendKeys(startInput.day, 19)+ c.click(endInput.year).sendKeys(endInput.year, 2001)+ c.click(endInput.month).sendKeys(endInput.month, 'NOV')+ c.click(endInput.day).sendKeys(endInput.day, 11)+ c.click(getSwitchToggle(wildfiresSwitch)) // OFF+ c.pause(250)+ c.click(getSwitchToggle(dustSwitch)) // ON+ c.pause(250)+ c.click(getSwitchToggle(volcanoesSwitch)) // ON+ c.pause(250)+ c.click(mapExtentFilterCheckbox) // OFF// APPLY- c.click(filterModalApply);+ c.click(filterModalApply)// Print dates to log for debugging purposes- c.getElementProperty(filterDates, 'innerText', function(result) {- console.log('result', result);- });+ c.getElementProperty(filterDates, 'innerText', function (result) {+ console.log('result', result)+ })// assert sidebar values- c.assert.containsText(filterDates, '2000 APR 19 - 2001 NOV 11');- c.expect.elements(filterIcons).count.to.equal(2);- c.expect.element(dustHazeIcon).to.be.present; // ON- c.expect.element(volcanoesIcon).to.be.present; // ON- c.expect.element(wildfiresIcon).to.not.be.present; // OFF+ c.assert.containsText(filterDates, '2000 APR 19 - 2001 NOV 11')+ c.expect.elements(filterIcons).count.to.equal(2)+ c.expect.element(dustHazeIcon).to.be.present // ON+ c.expect.element(volcanoesIcon).to.be.present // ON+ c.expect.element(wildfiresIcon).to.not.be.present // OFF},'Event Selected, No Filter Params: Shows only day of event, all categories, checkbox unchecked': (c) => {// TODO limit category to only the event category?- c.url(c.globals.url + backwardsCompatibleEventUrl);- c.assert.containsText(filterDates, '2005 DEC 31 - 2005 DEC 31');- openFilterModal(c);- assertDateInputValues(c, '2005-DEC-31', '2005-DEC-31');- c.expect.elements(filterIcons).count.to.equal(8);- c.expect.element(mapExtentFilterCheckbox).to.not.be.selected;- c.click(filterModalCancel);+ c.url(c.globals.url + backwardsCompatibleEventUrl)+ c.assert.containsText(filterDates, '2005 DEC 31 - 2005 DEC 31')+ openFilterModal(c)+ assertDateInputValues(c, '2005-DEC-31', '2005-DEC-31')+ c.expect.elements(filterIcons).count.to.equal(8)+ c.expect.element(mapExtentFilterCheckbox).to.not.be.selected+ c.click(filterModalCancel)},'No extent search checkbox in polar projections': (c) => {- c.url(`${c.globals.url}?e=true&efs=false`);-- openFilterModal(c);- c.expect.element(mapExtentFilterCheckbox).to.be.present;- c.expect.element(mapExtentFilterCheckbox).to.be.selected;- c.click(filterModalCancel);-- switchProjection(c, 'arctic');- openFilterModal(c);- c.expect.element(mapExtentFilterCheckbox).to.not.be.present;- c.click(filterModalCancel);-- switchProjection(c, 'geographic');- openFilterModal(c);- c.expect.element(mapExtentFilterCheckbox).to.be.present;- c.expect.element(mapExtentFilterCheckbox).to.be.selected;- c.click(filterModalCancel);-- switchProjection(c, 'antarctic');- openFilterModal(c);- c.expect.element(mapExtentFilterCheckbox).to.not.be.present;- c.click(filterModalCancel);- },- after(c) {- c.end();+ c.url(`${c.globals.url}?e=true&efs=false`)++ openFilterModal(c)+ c.expect.element(mapExtentFilterCheckbox).to.be.present+ c.expect.element(mapExtentFilterCheckbox).to.be.selected+ c.click(filterModalCancel)++ switchProjection(c, 'arctic')+ openFilterModal(c)+ c.expect.element(mapExtentFilterCheckbox).to.not.be.present+ c.click(filterModalCancel)++ switchProjection(c, 'geographic')+ openFilterModal(c)+ c.expect.element(mapExtentFilterCheckbox).to.be.present+ c.expect.element(mapExtentFilterCheckbox).to.be.selected+ c.click(filterModalCancel)++ switchProjection(c, 'antarctic')+ openFilterModal(c)+ c.expect.element(mapExtentFilterCheckbox).to.not.be.present+ c.click(filterModalCancel)},-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/events/events-mobile-test.js b/e2e/features/events/events-mobile-test.jsindex 8a7516bb0..dd2017112 100644--- a/e2e/features/events/events-mobile-test.js+++ b/e2e/features/events/events-mobile-test.js@@ -1,43 +1,43 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localQueryStrings = require('../../reuseables/querystrings.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localQueryStrings = require('../../reuseables/querystrings.js')-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000-const sidebarButton = '#accordion-toggler-button';-const sidebarContent = '#products-holder';-const eventsTab = '#events-sidebar-tab';-const icebergEvent = '#wv-events #sidebar-event-EONET_2703';-const selectedMarker = '.marker.selected';-const trackMarker = '.track-marker';+const sidebarButton = '#accordion-toggler-button'+const sidebarContent = '#products-holder'+const eventsTab = '#events-sidebar-tab'+const icebergEvent = '#wv-events #sidebar-event-EONET_2703'+const selectedMarker = '.marker.selected'+const trackMarker = '.track-marker'module.exports = {- before(c) {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.setWindowSize(375, 667); // iPhone 6/7/8 dimensions+ before (c) {+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.setWindowSize(375, 667) // iPhone 6/7/8 dimensions},'Events populated in sidebar': (c) => {- c.url(c.globals.url + localQueryStrings.mockEvents);- c.click(sidebarButton);- c.waitForElementVisible(sidebarContent, TIME_LIMIT);- c.click(eventsTab);- c.waitForElementVisible(icebergEvent, TIME_LIMIT);+ c.url(c.globals.url + localQueryStrings.mockEvents)+ c.click(sidebarButton)+ c.waitForElementVisible(sidebarContent, TIME_LIMIT)+ c.click(eventsTab)+ c.waitForElementVisible(icebergEvent, TIME_LIMIT)},'Clicking event in list closes sidebar and selects marker for event on map': (c) => {- c.click(icebergEvent);- c.waitForElementVisible(selectedMarker, TIME_LIMIT);- c.expect.element(sidebarContent).to.not.be.visible;- c.expect.element(sidebarButton).to.be.present;- c.expect.element(selectedMarker).to.be.present;+ c.click(icebergEvent)+ c.waitForElementVisible(selectedMarker, TIME_LIMIT)+ c.expect.element(sidebarContent).to.not.be.visible+ c.expect.element(sidebarButton).to.be.present+ c.expect.element(selectedMarker).to.be.present},'Events load when arriving via permalink': (c) => {- c.url(c.globals.url + localQueryStrings.stormEventSelected);- c.waitForElementVisible(selectedMarker, TIME_LIMIT);- c.expect.element(sidebarContent).to.not.be.visible;- c.expect.element(sidebarButton).to.be.present;- c.expect.element(selectedMarker).to.be.present;- c.expect.element(trackMarker).to.be.present;+ c.url(c.globals.url + localQueryStrings.stormEventSelected)+ c.waitForElementVisible(selectedMarker, TIME_LIMIT)+ c.expect.element(sidebarContent).to.not.be.visible+ c.expect.element(sidebarButton).to.be.present+ c.expect.element(selectedMarker).to.be.present+ c.expect.element(trackMarker).to.be.present},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/events/events-test.js b/e2e/features/events/events-test.jsindex ddc0c1ac7..ff821131b 100644--- a/e2e/features/events/events-test.js+++ b/e2e/features/events/events-test.js@@ -1,140 +1,140 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localQueryStrings = require('../../reuseables/querystrings.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localQueryStrings = require('../../reuseables/querystrings.js')-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000-const listOfEvents = '#wv-events ul.map-item-list';-const eventIcons = '.marker .event-icon';-const firstEvent = '#wv-events ul.map-item-list .item:first-child h4';-const secondEvent = '#wv-events #sidebar-event-EONET_99999';-const selectedFirstEvent = '#wv-events ul.map-item-list .item-selected:first-child h4';-const selectedMarker = '.marker.selected';-const firstExternalEventLink = '#wv-events ul.map-item-list .item:first-child .natural-event-link:first-child';-const trackMarker = '.track-marker';-const layersTab = '#layers-sidebar-tab';+const listOfEvents = '#wv-events ul.map-item-list'+const eventIcons = '.marker .event-icon'+const firstEvent = '#wv-events ul.map-item-list .item:first-child h4'+const secondEvent = '#wv-events #sidebar-event-EONET_99999'+const selectedFirstEvent = '#wv-events ul.map-item-list .item-selected:first-child h4'+const selectedMarker = '.marker.selected'+const firstExternalEventLink = '#wv-events ul.map-item-list .item:first-child .natural-event-link:first-child'+const trackMarker = '.track-marker'+const layersTab = '#layers-sidebar-tab'module.exports = {- before(c) {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ before (c) {+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},'Make sure that 4 fire layers are not present in layer list: use mock': (c) => {- c.url(c.globals.url + localQueryStrings.mockEvents);+ c.url(c.globals.url + localQueryStrings.mockEvents)c.waitForElementVisible('#sidebar-event-EONET_3931',TIME_LIMIT,() => {c.expect.element('#active-VIIRS_SNPP_Thermal_Anomalies_375m_Night')- .to.not.be.present;+ .to.not.be.presentc.expect.element('#active-VIIRS_SNPP_Thermal_Anomalies_375m_Day')- .to.not.be.present;+ .to.not.be.presentc.expect.element('#active-VIIRS_NOAA20_Thermal_Anomalies_375m_Day').to.not- .be.present;+ .be.presentc.expect.element('#active-VIIRS_NOAA20_Thermal_Anomalies_375m_Night').to- .not.be.present;- },- );+ .not.be.present+ }+ )},'Click fire event': (c) => {- c.click('#sidebar-event-EONET_3931');+ c.click('#sidebar-event-EONET_3931')},'Check that 4 fire layers are now present': (c) => {- c.click(layersTab);+ c.click(layersTab)c.waitForElementPresent('#active-VIIRS_SNPP_Thermal_Anomalies_375m_Night',TIME_LIMIT,() => {c.expect.element('#active-VIIRS_SNPP_Thermal_Anomalies_375m_Day')- .to.be.present;+ .to.be.presentc.expect.element('#active-VIIRS_NOAA20_Thermal_Anomalies_375m_Day').to.be- .present;+ .presentc.expect.element('#active-VIIRS_NOAA20_Thermal_Anomalies_375m_Night').to.be- .present;- },- );+ .present+ }+ )},'Use Mock to make sure appropriate number of event markers are appended to map': (c) => {- c.url(c.globals.url + localQueryStrings.mockEvents);+ c.url(c.globals.url + localQueryStrings.mockEvents)c.waitForElementVisible(listOfEvents, TIME_LIMIT, () => {- c.expect.elements(eventIcons).count.to.equal(8);- });+ c.expect.elements(eventIcons).count.to.equal(8)+ })},'On events tab click, events list is loaded': (c) => {- c.url(c.globals.url + localQueryStrings.mockEvents);- c.waitForElementVisible(listOfEvents, TIME_LIMIT);+ c.url(c.globals.url + localQueryStrings.mockEvents)+ c.waitForElementVisible(listOfEvents, TIME_LIMIT)},'Selecting event shows track points and markers which are not visible when switched to layer tab': (c) => {- const globalSelectors = c.globals.selectors;- c.click(secondEvent);+ const globalSelectors = c.globals.selectors+ c.click(secondEvent)c.waitForElementVisible(trackMarker, TIME_LIMIT, () => {- c.expect.elements(trackMarker).count.to.equal(5);- c.click(layersTab).pause(500);- c.expect.element(trackMarker).to.not.be.present;- c.expect.element(eventIcons).to.not.be.present;- c.click(globalSelectors.eventsTab).pause(500);- c.expect.element(trackMarker).to.be.present;- c.expect.element(eventIcons).to.be.present;- });+ c.expect.elements(trackMarker).count.to.equal(5)+ c.click(layersTab).pause(500)+ c.expect.element(trackMarker).to.not.be.present+ c.expect.element(eventIcons).to.not.be.present+ c.click(globalSelectors.eventsTab).pause(500)+ c.expect.element(trackMarker).to.be.present+ c.expect.element(eventIcons).to.be.present+ })},'Clicking an event in the list selects the event': (c) => {- c.url(c.globals.url + localQueryStrings.mockEvents);+ c.url(c.globals.url + localQueryStrings.mockEvents)c.waitForElementVisible(listOfEvents, TIME_LIMIT, () => {- c.click(firstEvent);+ c.click(firstEvent)c.waitForElementVisible(selectedMarker, TIME_LIMIT, () => {- c.expect.element(selectedFirstEvent).to.be.visible;- });- });+ c.expect.element(selectedFirstEvent).to.be.visible+ })+ })},'Verify that Url is updated': (c) => {c.assert.urlParameterEquals('l', true).assert.urlParameterEquals('t', true).assert.urlParameterEquals('v', true)- .assert.urlParameterEquals('e', true);+ .assert.urlParameterEquals('e', true)},'Verify Events may not be visible at all times is visible ': (c) => {- const globalSelectors = c.globals.selectors;+ const globalSelectors = c.globals.selectorsc.waitForElementVisible(globalSelectors.notifyMessage,TIME_LIMIT,() => {c.assert.containsText(globalSelectors.notifyMessage,- 'Events may not be visible at all times',- );- },- );+ 'Events may not be visible at all times'+ )+ }+ )},'Clicking event notification opens explanation in dialog': (c) => {- const globalSelectors = c.globals.selectors;+ const globalSelectors = c.globals.selectors- c.click(globalSelectors.notifyMessage).pause(500);+ c.click(globalSelectors.notifyMessage).pause(500)c.assert.containsText('#event_visibility_info h1',- 'Why can’t I see an event?',- );- c.click('#event_visibility_info .close').pause(500);- c.expect.element('#event_visibility_info').to.not.be.present;- c.click(globalSelectors.notificationDismissButton).pause(500);- c.expect.element(globalSelectors.notificationDismissButton).to.not.be.present;+ 'Why can’t I see an event?'+ )+ c.click('#event_visibility_info .close').pause(500)+ c.expect.element('#event_visibility_info').to.not.be.present+ c.click(globalSelectors.notificationDismissButton).pause(500)+ c.expect.element(globalSelectors.notificationDismissButton).to.not.be.present},'Clicking selected event deselects event': (c) => {- c.click(selectedFirstEvent).pause(500);- c.expect.element(selectedFirstEvent).to.not.be.present;+ c.click(selectedFirstEvent).pause(500)+ c.expect.element(selectedFirstEvent).to.not.be.present},'Check that clicking eternal link opens in new window': (c) => {- c.click(firstEvent).pause(500);+ c.click(firstEvent).pause(500)c.windowHandles((tabs) => {- c.assert.equal(tabs.value.length, 1);- });- c.click(firstExternalEventLink).pause(500);+ c.assert.equal(tabs.value.length, 1)+ })+ c.click(firstExternalEventLink).pause(500)c.windowHandles((tabs) => {- c.assert.equal(tabs.value.length, 2);- });+ c.assert.equal(tabs.value.length, 2)+ })},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/global-unit/coordinate-format-test.js b/e2e/features/global-unit/coordinate-format-test.jsindex b25230992..72885734d 100644--- a/e2e/features/global-unit/coordinate-format-test.js+++ b/e2e/features/global-unit/coordinate-format-test.js@@ -1,68 +1,68 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')const {- infoToolbarButton,-} = localSelectors;+ infoToolbarButton+} = localSelectors-const TIME_LIMIT = 5000;-const settingsInfoItem = '#settings_info_item';-const globalSettingsModal = '#global_settings_modal';-const latlondmSettingsButton = '#latlon-dm-btn';-const latlonddSettingsButton = '#latlon-dd-btn';-const tooltipCoordinates = '.tooltip-coordinates';-const coordinatesMapBtn = '#coords-panel';-const copyCoordsToClipboardBtn = '#copy-coordinates-to-clipboard-button';+const TIME_LIMIT = 5000+const settingsInfoItem = '#settings_info_item'+const globalSettingsModal = '#global_settings_modal'+const latlondmSettingsButton = '#latlon-dm-btn'+const latlonddSettingsButton = '#latlon-dd-btn'+const tooltipCoordinates = '.tooltip-coordinates'+const coordinatesMapBtn = '#coords-panel'+const copyCoordsToClipboardBtn = '#copy-coordinates-to-clipboard-button'-const locationMarkerQueryString = '?v=-97.7284840660436,15.91105901837444,-63.44259121174646,45.128898266232824&s=-81.3507,28.5946&t=2022-08-09-T15%3A32%3A01Z';+const locationMarkerQueryString = '?v=-97.7284840660436,15.91105901837444,-63.44259121174646,45.128898266232824&s=-81.3507,28.5946&t=2022-08-09-T15%3A32%3A01Z'module.exports = {before: (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},'Click the change coordinate format map button changes the active coordinate format selection in global settings': (c) => {- c.url(c.globals.url + locationMarkerQueryString);+ c.url(c.globals.url + locationMarkerQueryString)- c.click(copyCoordsToClipboardBtn);- c.pause(500);+ c.click(copyCoordsToClipboardBtn)+ c.pause(500)- c.waitForElementVisible(coordinatesMapBtn, TIME_LIMIT);- c.click(coordinatesMapBtn);+ c.waitForElementVisible(coordinatesMapBtn, TIME_LIMIT)+ c.click(coordinatesMapBtn)- c.click(infoToolbarButton);+ c.click(infoToolbarButton)- c.waitForElementVisible(settingsInfoItem, TIME_LIMIT);- c.click(settingsInfoItem);+ c.waitForElementVisible(settingsInfoItem, TIME_LIMIT)+ c.click(settingsInfoItem)- c.waitForElementVisible(globalSettingsModal);- c.pause(500);+ c.waitForElementVisible(globalSettingsModal)+ c.pause(500)c.expect.element(latlondmSettingsButton)- .to.have.property('className').contains('active');+ .to.have.property('className').contains('active')},'Selecting LATLON-DD in Global Settings changes coordinate format in location marker': (c) => {- c.url(c.globals.url + locationMarkerQueryString);+ c.url(c.globals.url + locationMarkerQueryString)- c.click(infoToolbarButton);+ c.click(infoToolbarButton)- c.waitForElementVisible(settingsInfoItem, TIME_LIMIT);- c.click(settingsInfoItem);+ c.waitForElementVisible(settingsInfoItem, TIME_LIMIT)+ c.click(settingsInfoItem)- c.waitForElementVisible(globalSettingsModal);- c.pause(500);+ c.waitForElementVisible(globalSettingsModal)+ c.pause(500)- c.click(latlonddSettingsButton);- c.pause(500);+ c.click(latlonddSettingsButton)+ c.pause(500)c.expect.element(tooltipCoordinates)- .text.to.contain('28.5946°, -81.3507°');+ .text.to.contain('28.5946°, -81.3507°')},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/global-unit/global-unit-test.js b/e2e/features/global-unit/global-unit-test.jsindex 5fecdc8cc..1a747ff48 100644--- a/e2e/features/global-unit/global-unit-test.js+++ b/e2e/features/global-unit/global-unit-test.js@@ -1,90 +1,90 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')const {- infoToolbarButton,-} = localSelectors;+ infoToolbarButton+} = localSelectors-const TIME_LIMIT = 5000;-const settingsInfoItem = '#settings_info_item';-const globalSettingsModal = '#global_settings_modal';-const settingContainer = '.global-setting-container';-const KelvinSettingsButton = '#global_settings_modal button.setting-button:nth-child(1)';+const TIME_LIMIT = 5000+const settingsInfoItem = '#settings_info_item'+const globalSettingsModal = '#global_settings_modal'+const settingContainer = '.global-setting-container'+const KelvinSettingsButton = '#global_settings_modal button.setting-button:nth-child(1)'-const SSTQueryString = '?l=GHRSST_L4_MUR_Sea_Surface_Temperature,Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg=false&t=2020-09-28-T20%3A40%3A53Z';-const SSTMinPalette = '#GHRSST_L4_MUR_Sea_Surface_Temperature_GHRSST_Sea_Surface_Temperature_0_legend_0 > div.wv-palettes-min';-const SSTMaxPalette = '#GHRSST_L4_MUR_Sea_Surface_Temperature_GHRSST_Sea_Surface_Temperature_0_legend_0 > div.wv-palettes-max';+const SSTQueryString = '?l=GHRSST_L4_MUR_Sea_Surface_Temperature,Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg=false&t=2020-09-28-T20%3A40%3A53Z'+const SSTMinPalette = '#GHRSST_L4_MUR_Sea_Surface_Temperature_GHRSST_Sea_Surface_Temperature_0_legend_0 > div.wv-palettes-min'+const SSTMaxPalette = '#GHRSST_L4_MUR_Sea_Surface_Temperature_GHRSST_Sea_Surface_Temperature_0_legend_0 > div.wv-palettes-max'module.exports = {before: (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},'Global settings menu item opens global settings modal': (c) => {- c.expect.element(infoToolbarButton).to.be.present;- c.click(infoToolbarButton);+ c.expect.element(infoToolbarButton).to.be.present+ c.click(infoToolbarButton)- c.waitForElementVisible(settingsInfoItem, TIME_LIMIT);- c.click(settingsInfoItem);+ c.waitForElementVisible(settingsInfoItem, TIME_LIMIT)+ c.click(settingsInfoItem)- c.waitForElementVisible(globalSettingsModal);- c.pause(500);+ c.waitForElementVisible(globalSettingsModal)+ c.pause(500)- c.expect.element(globalSettingsModal).to.be.present;- c.expect.element(settingContainer).to.be.present;+ c.expect.element(globalSettingsModal).to.be.present+ c.expect.element(settingContainer).to.be.present},'Initial temp unit is default value in layer palette legend': (c) => {- c.url(c.globals.url + SSTQueryString);+ c.url(c.globals.url + SSTQueryString)c.expect.element(SSTMinPalette)- .to.have.text.equal('< 0.00 °C');+ .to.have.text.equal('< 0.00 °C')c.expect.element(SSTMaxPalette)- .to.have.text.equal('≥ 32.00 °C');+ .to.have.text.equal('≥ 32.00 °C')},'Selecting Kelvin unit changes unit being used in layer palette legend': (c) => {- c.click(infoToolbarButton);+ c.click(infoToolbarButton)- c.waitForElementVisible(settingsInfoItem, TIME_LIMIT);- c.click(settingsInfoItem);+ c.waitForElementVisible(settingsInfoItem, TIME_LIMIT)+ c.click(settingsInfoItem)- c.waitForElementVisible(globalSettingsModal);- c.pause(500);+ c.waitForElementVisible(globalSettingsModal)+ c.pause(500)- c.click(KelvinSettingsButton);- c.pause(500);+ c.click(KelvinSettingsButton)+ c.pause(500)c.expect.element(SSTMinPalette)- .to.have.text.equal('< 273.15 K');+ .to.have.text.equal('< 273.15 K')c.expect.element(SSTMaxPalette)- .to.have.text.equal('≥ 305.15 K');+ .to.have.text.equal('≥ 305.15 K')},'Kelvin global unit is retained via localStorage and active on new url': (c) => {- c.url(c.globals.url + SSTQueryString);- c.waitForElementVisible(infoToolbarButton, TIME_LIMIT);- c.click(infoToolbarButton);+ c.url(c.globals.url + SSTQueryString)+ c.waitForElementVisible(infoToolbarButton, TIME_LIMIT)+ c.click(infoToolbarButton)- c.waitForElementVisible(settingsInfoItem, TIME_LIMIT);- c.click(settingsInfoItem);+ c.waitForElementVisible(settingsInfoItem, TIME_LIMIT)+ c.click(settingsInfoItem)- c.waitForElementVisible(globalSettingsModal);- c.pause(500);- c.useCss().assert.cssClassPresent(KelvinSettingsButton, 'active');+ c.waitForElementVisible(globalSettingsModal)+ c.pause(500)+ c.useCss().assert.cssClassPresent(KelvinSettingsButton, 'active')c.expect.element(SSTMinPalette)- .to.have.text.equal('< 273.15 K');+ .to.have.text.equal('< 273.15 K')c.expect.element(SSTMaxPalette)- .to.have.text.equal('≥ 305.15 K');+ .to.have.text.equal('≥ 305.15 K')},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/image-download/crosses-dateline-test.js b/e2e/features/image-download/crosses-dateline-test.jsindex ef55a729b..8f0fbbbf0 100644--- a/e2e/features/image-download/crosses-dateline-test.js+++ b/e2e/features/image-download/crosses-dateline-test.js@@ -1,53 +1,53 @@-const { normalizeViewport } = require('../../reuseables/normalize-viewport');+const { normalizeViewport } = require('../../reuseables/normalize-viewport')const {- openImageDownloadPanel,-} = require('../../reuseables/image-download');+ openImageDownloadPanel+} = require('../../reuseables/image-download')-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000-const datelineAlert = '#snapshot-dateline-alert';-const datelineAlertMessage = '#snapshot-dateline-alert .wv-alert-message';+const datelineAlert = '#snapshot-dateline-alert'+const datelineAlertMessage = '#snapshot-dateline-alert .wv-alert-message'-const withinMapURLParams = '?v=-67.80916012733559,-56.052180562072095,-30.50743102883792,-30.873513420586164&t=2021-08-08-T0';-const crossesPrevDayURLParams = '?v=161.16767164758798,-54.46571918482002,198.46940074608565,-29.287052043334096&t=2021-08-08-T0';-const crossesNextDayURLParams = '?v=-198.76946733086245,-59.504883811673906,-161.46773823236478,-34.326216670187975&t=2021-08-08-T0';+const withinMapURLParams = '?v=-67.80916012733559,-56.052180562072095,-30.50743102883792,-30.873513420586164&t=2021-08-08-T0'+const crossesPrevDayURLParams = '?v=161.16767164758798,-54.46571918482002,198.46940074608565,-29.287052043334096&t=2021-08-08-T0'+const crossesNextDayURLParams = '?v=-198.76946733086245,-59.504883811673906,-161.46773823236478,-34.326216670187975&t=2021-08-08-T0'module.exports = {- after(client) {- client.end();+ after (client) {+ client.end()},'No dateline alert notification with message if not crossing dateline(s)': (c) => {- normalizeViewport(c, 1024, 768);- c.url(c.globals.url + withinMapURLParams);- openImageDownloadPanel(c);- c.pause(500);+ normalizeViewport(c, 1024, 768)+ c.url(c.globals.url + withinMapURLParams)+ openImageDownloadPanel(c)+ c.pause(500)- c.expect.element(datelineAlert).to.not.be.present;+ c.expect.element(datelineAlert).to.not.be.present},'Dateline alert notification with previous day message if crosses previous day dateline': (c) => {- normalizeViewport(c, 1024, 768);- c.url(c.globals.url + crossesPrevDayURLParams);- openImageDownloadPanel(c);- c.pause(500);+ normalizeViewport(c, 1024, 768)+ c.url(c.globals.url + crossesPrevDayURLParams)+ openImageDownloadPanel(c)+ c.pause(500)- c.expect.element(datelineAlert).to.be.present;+ c.expect.element(datelineAlert).to.be.presentc.waitForElementVisible(datelineAlertMessage, TIME_LIMIT, (e) => {- c.assert.containsText(datelineAlertMessage, 'The selected snapshot area crosses the dateline and uses imagery from the previous day 2021 AUG 07.');- });+ c.assert.containsText(datelineAlertMessage, 'The selected snapshot area crosses the dateline and uses imagery from the previous day 2021 AUG 07.')+ })},'Dateline alert notification with next day message if crosses next day dateline': (c) => {- normalizeViewport(c, 1024, 768);- c.url(c.globals.url + crossesNextDayURLParams);- openImageDownloadPanel(c);- c.pause(500);+ normalizeViewport(c, 1024, 768)+ c.url(c.globals.url + crossesNextDayURLParams)+ openImageDownloadPanel(c)+ c.pause(500)- c.expect.element(datelineAlert).to.be.present;+ c.expect.element(datelineAlert).to.be.presentc.waitForElementVisible(datelineAlertMessage, TIME_LIMIT, (e) => {- c.assert.containsText(datelineAlertMessage, 'The selected snapshot area crosses the dateline and uses imagery from the next day 2021 AUG 09.');- });- },+ c.assert.containsText(datelineAlertMessage, 'The selected snapshot area crosses the dateline and uses imagery from the next day 2021 AUG 09.')+ })+ }-};+}diff --git a/e2e/features/image-download/formats-test.js b/e2e/features/image-download/formats-test.jsindex fb74ab11f..923618c5d 100644--- a/e2e/features/image-download/formats-test.js+++ b/e2e/features/image-download/formats-test.js@@ -1,88 +1,88 @@-const { switchProjection } = require('../../reuseables/switch-projection');-const { bookmark } = require('../../reuseables/bookmark');+const { switchProjection } = require('../../reuseables/switch-projection')+const { bookmark } = require('../../reuseables/bookmark')const {openImageDownloadPanel,closeImageDownloadPanel,- clickDownload,-} = require('../../reuseables/image-download');+ clickDownload+} = require('../../reuseables/image-download')const startParams = ['l=MODIS_Terra_CorrectedReflectance_TrueColor','v=-1,-1,1,1','t=2018-06-01',- 'imageDownload=',-];+ 'imageDownload='+]module.exports = {- after(client) {- client.end();+ after (client) {+ client.end()},- 'JPEG is the default': function(c) {- bookmark(c, startParams);- openImageDownloadPanel(c);- clickDownload(c);- c.pause(2000);+ 'JPEG is the default': function (c) {+ bookmark(c, startParams)+ openImageDownloadPanel(c)+ clickDownload(c)+ c.pause(2000)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .and.to.contain('FORMAT=image/jpeg');+ .and.to.contain('FORMAT=image/jpeg')c.expect.element('#wv-image-download-url').to.have.attribute('url')- .and.not.to.contain('WORLDFILE');- closeImageDownloadPanel(c);+ .and.not.to.contain('WORLDFILE')+ closeImageDownloadPanel(c)},- 'Add a worldfile': function(c) {- openImageDownloadPanel(c);- c.click('#wv-image-worldfile option[value="1"]');- clickDownload(c);- c.pause(2000);+ 'Add a worldfile': function (c) {+ openImageDownloadPanel(c)+ c.click('#wv-image-worldfile option[value="1"]')+ clickDownload(c)+ c.pause(2000)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .and.to.contain('WORLDFILE=true');- c.click('#wv-image-worldfile option[value="0"]');- closeImageDownloadPanel(c);+ .and.to.contain('WORLDFILE=true')+ c.click('#wv-image-worldfile option[value="0"]')+ closeImageDownloadPanel(c)},- 'Select PNG': function(c) {- openImageDownloadPanel(c);- c.click('#wv-image-format option[value="image/png"]');- clickDownload(c);+ 'Select PNG': function (c) {+ openImageDownloadPanel(c)+ c.click('#wv-image-format option[value="image/png"]')+ clickDownload(c)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .contain('FORMAT=image/png');- closeImageDownloadPanel(c);+ .contain('FORMAT=image/png')+ closeImageDownloadPanel(c)},- 'Switch to arctic, is PNG': function(c) {- switchProjection(c, 'arctic');- openImageDownloadPanel(c);- clickDownload(c);+ 'Switch to arctic, is PNG': function (c) {+ switchProjection(c, 'arctic')+ openImageDownloadPanel(c)+ clickDownload(c)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .contain('FORMAT=image/png');- closeImageDownloadPanel(c);+ .contain('FORMAT=image/png')+ closeImageDownloadPanel(c)},- 'Switch to geographic, select KMZ, switch to arctic, is PNG': function(c) {- switchProjection(c, 'geographic');- openImageDownloadPanel(c);+ 'Switch to geographic, select KMZ, switch to arctic, is PNG': function (c) {+ switchProjection(c, 'geographic')+ openImageDownloadPanel(c)c.click(- '#wv-image-format option[value="application/vnd.google-earth.kmz"]',- );- closeImageDownloadPanel(c);- switchProjection(c, 'arctic');- openImageDownloadPanel(c);- c.pause(500);- clickDownload(c);+ '#wv-image-format option[value="application/vnd.google-earth.kmz"]'+ )+ closeImageDownloadPanel(c)+ switchProjection(c, 'arctic')+ openImageDownloadPanel(c)+ c.pause(500)+ clickDownload(c)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .contain('FORMAT=image/jpeg');- },-};+ .contain('FORMAT=image/jpeg')+ }+}diff --git a/e2e/features/image-download/global-select.js b/e2e/features/image-download/global-select.jsindex 178c6b2bc..e63fef8e3 100644--- a/e2e/features/image-download/global-select.js+++ b/e2e/features/image-download/global-select.js@@ -1,43 +1,43 @@-const { bookmark } = require('../../reuseables/bookmark');-const { normalizeViewport } = require('../../reuseables/normalize-viewport');+const { bookmark } = require('../../reuseables/bookmark')+const { normalizeViewport } = require('../../reuseables/normalize-viewport')const {- openImageDownloadPanel,-} = require('../../reuseables/image-download');+ openImageDownloadPanel+} = require('../../reuseables/image-download')const startParams = ['p=geographic','v=-180,-90,180,90','l=MODIS_Terra_CorrectedReflectance_TrueColor','t=2018-06-01',- 'imageDownload=',-];+ 'imageDownload='+]-const globalSelectInput = '#image-global-cb';+const globalSelectInput = '#image-global-cb'module.exports = {- after(client) {- client.end();+ after (client) {+ client.end()},- 'Verify that global select is present and not selected': function(c) {- normalizeViewport(c, 1024, 768);- bookmark(c, startParams);- openImageDownloadPanel(c);- c.expect.element(globalSelectInput).to.be.present;- c.expect.element(globalSelectInput).to.not.be.selected;+ 'Verify that global select is present and not selected': function (c) {+ normalizeViewport(c, 1024, 768)+ bookmark(c, startParams)+ openImageDownloadPanel(c)+ c.expect.element(globalSelectInput).to.be.present+ c.expect.element(globalSelectInput).to.not.be.selected},- 'Verify that checking checkbox updates bounding-box labels': function(c) {- c.expect.element('#wv-image-top').text.to.not.contain('180.0000');- c.click(globalSelectInput);- c.pause(500);- c.expect.element('#wv-image-top').text.to.contain('180.0000');- c.expect.element('#wv-image-bottom').text.to.contain('180.0000');- c.pause(500);+ 'Verify that checking checkbox updates bounding-box labels': function (c) {+ c.expect.element('#wv-image-top').text.to.not.contain('180.0000')+ c.click(globalSelectInput)+ c.pause(500)+ c.expect.element('#wv-image-top').text.to.contain('180.0000')+ c.expect.element('#wv-image-bottom').text.to.contain('180.0000')+ c.pause(500)},- 'Verify that unchecking checkbox updates bounding-box to previous': function(c) {- c.click(globalSelectInput);- c.pause(500);- c.expect.element('#wv-image-top').text.to.not.contain('180.0000');- c.expect.element('#wv-image-top').text.to.contain('35.1563');- c.expect.element('#wv-image-bottom').text.to.contain('35.1563');- c.pause(2000);- },-};+ 'Verify that unchecking checkbox updates bounding-box to previous': function (c) {+ c.click(globalSelectInput)+ c.pause(500)+ c.expect.element('#wv-image-top').text.to.not.contain('180.0000')+ c.expect.element('#wv-image-top').text.to.contain('35.1563')+ c.expect.element('#wv-image-bottom').text.to.contain('35.1563')+ c.pause(2000)+ }+}diff --git a/e2e/features/image-download/initial-state-test.js b/e2e/features/image-download/initial-state-test.jsindex 1760e80a4..3eee5ad95 100644--- a/e2e/features/image-download/initial-state-test.js+++ b/e2e/features/image-download/initial-state-test.js@@ -1,23 +1,23 @@-const { loadAndSkipTour } = require('../../reuseables/skip-tour');-const { switchProjection } = require('../../reuseables/switch-projection');+const { loadAndSkipTour } = require('../../reuseables/skip-tour')+const { switchProjection } = require('../../reuseables/switch-projection')const {openImageDownloadPanel,- closeImageDownloadPanel,-} = require('../../reuseables/image-download');+ closeImageDownloadPanel+} = require('../../reuseables/image-download')-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {- before(client) {- loadAndSkipTour(client, TIME_LIMIT);+ before (client) {+ loadAndSkipTour(client, TIME_LIMIT)},- after(client) {- client.end();+ after (client) {+ client.end()},- 'Check resolutions': function(c) {- openImageDownloadPanel(c);+ 'Check resolutions': function (c) {+ openImageDownloadPanel(c)const expected = ['30m','60m',@@ -26,38 +26,38 @@ module.exports = {'500m','1km','5km',- '10km',- ].join('\n');- c.expect.element('#wv-image-resolution').text.to.equal(expected);+ '10km'+ ].join('\n')+ c.expect.element('#wv-image-resolution').text.to.equal(expected)},- 'Check formats': function(c) {- const expected = ['JPEG', 'PNG', 'GeoTIFF', 'KMZ'].join('\n');- c.expect.element('#wv-image-format').text.to.equal(expected);+ 'Check formats': function (c) {+ const expected = ['JPEG', 'PNG', 'GeoTIFF', 'KMZ'].join('\n')+ c.expect.element('#wv-image-format').text.to.equal(expected)},- 'Check worldfile option': function(c) {- const expected = ['No', 'Yes'].join('\n');- c.expect.element('#wv-image-worldfile').text.to.equal(expected);+ 'Check worldfile option': function (c) {+ const expected = ['No', 'Yes'].join('\n')+ c.expect.element('#wv-image-worldfile').text.to.equal(expected)},- 'Check max size': function(c) {- const expected = '8200px x 8200px';- c.expect.element('.wv-image-max-size').text.to.equal(expected);+ 'Check max size': function (c) {+ const expected = '8200px x 8200px'+ c.expect.element('.wv-image-max-size').text.to.equal(expected)},- 'Check arctic formats': function(c) {- closeImageDownloadPanel(c);- switchProjection(c, 'arctic');- openImageDownloadPanel(c);- const expected = ['JPEG', 'PNG', 'GeoTIFF'].join('\n');- c.expect.element('#wv-image-format').text.to.equal(expected);+ 'Check arctic formats': function (c) {+ closeImageDownloadPanel(c)+ switchProjection(c, 'arctic')+ openImageDownloadPanel(c)+ const expected = ['JPEG', 'PNG', 'GeoTIFF'].join('\n')+ c.expect.element('#wv-image-format').text.to.equal(expected)},- 'Check antarctic formats': function(c) {- closeImageDownloadPanel(c);- switchProjection(c, 'antarctic');- openImageDownloadPanel(c);- const expected = ['JPEG', 'PNG', 'GeoTIFF'].join('\n');- c.expect.element('#wv-image-format').text.to.equal(expected);- closeImageDownloadPanel(c);- },-};+ 'Check antarctic formats': function (c) {+ closeImageDownloadPanel(c)+ switchProjection(c, 'antarctic')+ openImageDownloadPanel(c)+ const expected = ['JPEG', 'PNG', 'GeoTIFF'].join('\n')+ c.expect.element('#wv-image-format').text.to.equal(expected)+ closeImageDownloadPanel(c)+ }+}diff --git a/e2e/features/image-download/layers-test.js b/e2e/features/image-download/layers-test.jsindex bd3d5286b..a8b2caff0 100644--- a/e2e/features/image-download/layers-test.js+++ b/e2e/features/image-download/layers-test.js@@ -1,51 +1,51 @@-const { bookmark } = require('../../reuseables/bookmark');+const { bookmark } = require('../../reuseables/bookmark')const {openImageDownloadPanel,- clickDownload,-} = require('../../reuseables/image-download');+ clickDownload+} = require('../../reuseables/image-download')const startParams = ['v=-180,-90,180,90','t=2018-06-01',- 'imageDownload=',-];+ 'imageDownload='+]module.exports = {- after(client) {- client.end();+ after (client) {+ client.end()},- 'List layers in draw order': function(c) {- bookmark(c, startParams.concat(['l=MODIS_Terra_CorrectedReflectance_TrueColor,Reference_Features_15m,MODIS_Terra_Aerosol']));- openImageDownloadPanel(c);- clickDownload(c);+ 'List layers in draw order': function (c) {+ bookmark(c, startParams.concat(['l=MODIS_Terra_CorrectedReflectance_TrueColor,Reference_Features_15m,MODIS_Terra_Aerosol']))+ openImageDownloadPanel(c)+ clickDownload(c)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .and.to.contain('LAYERS=MODIS_Terra_CorrectedReflectance_TrueColor,MODIS_Terra_Aerosol,Reference_Features_15m');+ .and.to.contain('LAYERS=MODIS_Terra_CorrectedReflectance_TrueColor,MODIS_Terra_Aerosol,Reference_Features_15m')},- 'Move AOD over the reference features': function(c) {- bookmark(c, startParams.concat(['l=MODIS_Terra_CorrectedReflectance_TrueColor,MODIS_Terra_Aerosol,Reference_Features_15m']));- openImageDownloadPanel(c);- clickDownload(c);+ 'Move AOD over the reference features': function (c) {+ bookmark(c, startParams.concat(['l=MODIS_Terra_CorrectedReflectance_TrueColor,MODIS_Terra_Aerosol,Reference_Features_15m']))+ openImageDownloadPanel(c)+ clickDownload(c)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .and.to.contain('LAYERS=MODIS_Terra_CorrectedReflectance_TrueColor,Reference_Features_15m,MODIS_Terra_Aerosol');+ .and.to.contain('LAYERS=MODIS_Terra_CorrectedReflectance_TrueColor,Reference_Features_15m,MODIS_Terra_Aerosol')},- 'Do not include obscured layers': function(c) {- bookmark(c, startParams.concat(['l=MODIS_Terra_CorrectedReflectance_TrueColor,MODIS_Aqua_CorrectedReflectance_TrueColor']));- openImageDownloadPanel(c);- clickDownload(c);+ 'Do not include obscured layers': function (c) {+ bookmark(c, startParams.concat(['l=MODIS_Terra_CorrectedReflectance_TrueColor,MODIS_Aqua_CorrectedReflectance_TrueColor']))+ openImageDownloadPanel(c)+ clickDownload(c)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .and.to.contain('LAYERS=MODIS_Terra_CorrectedReflectance_TrueColor');+ .and.to.contain('LAYERS=MODIS_Terra_CorrectedReflectance_TrueColor')},- 'Multiple base layers when one is semi-transparent': function(c) {- bookmark(c, startParams.concat(['l=MODIS_Terra_CorrectedReflectance_TrueColor(opacity=0.5),MODIS_Aqua_CorrectedReflectance_TrueColor']));- openImageDownloadPanel(c);- clickDownload(c);+ 'Multiple base layers when one is semi-transparent': function (c) {+ bookmark(c, startParams.concat(['l=MODIS_Terra_CorrectedReflectance_TrueColor(opacity=0.5),MODIS_Aqua_CorrectedReflectance_TrueColor']))+ openImageDownloadPanel(c)+ clickDownload(c)c.expect.element('#wv-image-download-url').to.have.attribute('url').and.to.contain('LAYERS=MODIS_Aqua_CorrectedReflectance_TrueColor,MODIS_Terra_CorrectedReflectance_TrueColor')- .and.to.contain('OPACITIES=,0.5');- },+ .and.to.contain('OPACITIES=,0.5')+ }-};+}diff --git a/e2e/features/image-download/projection-test.js b/e2e/features/image-download/projection-test.jsindex 2bda1ca44..830e6f76f 100644--- a/e2e/features/image-download/projection-test.js+++ b/e2e/features/image-download/projection-test.js@@ -1,46 +1,46 @@-const { switchProjection } = require('../../reuseables/switch-projection');-const { bookmark } = require('../../reuseables/bookmark');+const { switchProjection } = require('../../reuseables/switch-projection')+const { bookmark } = require('../../reuseables/bookmark')const {openImageDownloadPanel,closeImageDownloadPanel,- clickDownload,-} = require('../../reuseables/image-download');+ clickDownload+} = require('../../reuseables/image-download')const startParams = ['l=MODIS_Terra_CorrectedReflectance_TrueColor','t=2018-06-01',- 'imageDownload=',-];+ 'imageDownload='+]module.exports = {- after(client) {- client.end();+ after (client) {+ client.end()},- 'Geographic is EPSG:4326': function(c) {- bookmark(c, startParams);- openImageDownloadPanel(c);- clickDownload(c);+ 'Geographic is EPSG:4326': function (c) {+ bookmark(c, startParams)+ openImageDownloadPanel(c)+ clickDownload(c)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .and.to.contain('CRS=EPSG:4326');- closeImageDownloadPanel(c);+ .and.to.contain('CRS=EPSG:4326')+ closeImageDownloadPanel(c)},- 'Arctic is EPSG:3413': function(c) {- switchProjection(c, 'arctic');- openImageDownloadPanel(c);- clickDownload(c);+ 'Arctic is EPSG:3413': function (c) {+ switchProjection(c, 'arctic')+ openImageDownloadPanel(c)+ clickDownload(c)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .and.to.contain('CRS=EPSG:3413');- closeImageDownloadPanel(c);+ .and.to.contain('CRS=EPSG:3413')+ closeImageDownloadPanel(c)},- 'Antarctic is EPSG:3031': function(c) {- switchProjection(c, 'antarctic');- openImageDownloadPanel(c);- clickDownload(c);+ 'Antarctic is EPSG:3031': function (c) {+ switchProjection(c, 'antarctic')+ openImageDownloadPanel(c)+ clickDownload(c)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .and.to.contain('CRS=EPSG:3031');- closeImageDownloadPanel(c);- },-};+ .and.to.contain('CRS=EPSG:3031')+ closeImageDownloadPanel(c)+ }+}diff --git a/e2e/features/image-download/resolutions3413-test.js b/e2e/features/image-download/resolutions3413-test.jsindex 0cdc3a55d..0d8c3b9e2 100644--- a/e2e/features/image-download/resolutions3413-test.js+++ b/e2e/features/image-download/resolutions3413-test.js@@ -1,97 +1,97 @@-const { zoomIn } = require('../../reuseables/zoom');-const { bookmark } = require('../../reuseables/bookmark');-const { normalizeViewport } = require('../../reuseables/normalize-viewport');+const { zoomIn } = require('../../reuseables/zoom')+const { bookmark } = require('../../reuseables/bookmark')+const { normalizeViewport } = require('../../reuseables/normalize-viewport')const {openImageDownloadPanel,closeImageDownloadPanel,- clickDownload,-} = require('../../reuseables/image-download');+ clickDownload+} = require('../../reuseables/image-download')const startParams = ['p=arctic','v=-4194304,-3145728,4194304,3145728','l=MODIS_Terra_CorrectedReflectance_TrueColor','t=2018-06-01',- 'imageDownload=',-];+ 'imageDownload='+]module.exports = {- after(client) {- client.end();+ after (client) {+ client.end()},- 'In the arctic, top zoom levels is 5km': function(c) {- normalizeViewport(c, 1024, 768);- bookmark(c, startParams);- openImageDownloadPanel(c);+ 'In the arctic, top zoom levels is 5km': function (c) {+ normalizeViewport(c, 1024, 768)+ bookmark(c, startParams)+ openImageDownloadPanel(c)c.expect.element('#wv-image-resolution option[value="20"]')- .to.be.selected;- closeImageDownloadPanel(c);+ .to.be.selected+ closeImageDownloadPanel(c)},- 'Next two zooms are 1km': function(c) {- zoomIn(c);- openImageDownloadPanel(c);+ 'Next two zooms are 1km': function (c) {+ zoomIn(c)+ openImageDownloadPanel(c)c.expect.element('#wv-image-resolution option[value="4"]')- .to.be.selected;- closeImageDownloadPanel(c);- zoomIn(c);- openImageDownloadPanel(c);+ .to.be.selected+ closeImageDownloadPanel(c)+ zoomIn(c)+ openImageDownloadPanel(c)c.expect.element('#wv-image-resolution option[value="4"]')- .to.be.selected;- closeImageDownloadPanel(c);+ .to.be.selected+ closeImageDownloadPanel(c)},- 'Next zoom is 500m': function(c) {- zoomIn(c);- openImageDownloadPanel(c);+ 'Next zoom is 500m': function (c) {+ zoomIn(c)+ openImageDownloadPanel(c)c.expect.element('#wv-image-resolution option[value="2"]')- .to.be.selected;- closeImageDownloadPanel(c);+ .to.be.selected+ closeImageDownloadPanel(c)},- 'Next zoom is 250m': function(c) {- zoomIn(c);- openImageDownloadPanel(c);+ 'Next zoom is 250m': function (c) {+ zoomIn(c)+ openImageDownloadPanel(c)c.expect.element('#wv-image-resolution option[value="1"]')- .to.be.selected;- closeImageDownloadPanel(c);- zoomIn(c);- openImageDownloadPanel(c);+ .to.be.selected+ closeImageDownloadPanel(c)+ zoomIn(c)+ openImageDownloadPanel(c)c.expect.element('#wv-image-resolution option[value="1"]')- .to.be.selected;- closeImageDownloadPanel(c);+ .to.be.selected+ closeImageDownloadPanel(c)},- 'Last zoom level is 250m': function(c) {+ 'Last zoom level is 250m': function (c) {// mash the zoom button a bunch of times and see if it changesfor (let i = 0; i < 5; i += 1) {- zoomIn(c);+ zoomIn(c)}- openImageDownloadPanel(c);+ openImageDownloadPanel(c)c.expect.element('#wv-image-resolution option[value="1"]')- .to.be.selected;- closeImageDownloadPanel(c);+ .to.be.selected+ closeImageDownloadPanel(c)},- 'Click download': function(c) {- openImageDownloadPanel(c);- clickDownload(c);+ 'Click download': function (c) {+ openImageDownloadPanel(c)+ clickDownload(c)c.getAttribute('#wv-image-download-url', 'url', (result) => {// See if the bounding box here is reasonable. Should be centered// on 0,0 and not be wider than 20km- const matcher = /BBOX=([^,]+),([^,]+),([^,]+),([^&]+)/;- const matches = matcher.exec(result.value);- const x0 = Number.parseFloat(matches[1]);- const y0 = Number.parseFloat(matches[2]);- const x1 = Number.parseFloat(matches[3]);- const y1 = Number.parseFloat(matches[4]);- c.assert.ok(x0 < 0 && x0 > -20000);- c.assert.ok(y0 < 0 && y0 > -20000);- c.assert.ok(x1 > 0 && x1 < 20000);- c.assert.ok(y1 > 0 && y1 < 20000);- });- },+ const matcher = /BBOX=([^,]+),([^,]+),([^,]+),([^&]+)/+ const matches = matcher.exec(result.value)+ const x0 = Number.parseFloat(matches[1])+ const y0 = Number.parseFloat(matches[2])+ const x1 = Number.parseFloat(matches[3])+ const y1 = Number.parseFloat(matches[4])+ c.assert.ok(x0 < 0 && x0 > -20000)+ c.assert.ok(y0 < 0 && y0 > -20000)+ c.assert.ok(x1 > 0 && x1 < 20000)+ c.assert.ok(y1 > 0 && y1 < 20000)+ })+ }-};+}diff --git a/e2e/features/image-download/resolutions4326-test.js b/e2e/features/image-download/resolutions4326-test.jsindex 469b8c118..d2f37166f 100644--- a/e2e/features/image-download/resolutions4326-test.js+++ b/e2e/features/image-download/resolutions4326-test.js@@ -1,124 +1,124 @@-const { zoomIn } = require('../../reuseables/zoom');-const { bookmark } = require('../../reuseables/bookmark');-const { normalizeViewport } = require('../../reuseables/normalize-viewport');+const { zoomIn } = require('../../reuseables/zoom')+const { bookmark } = require('../../reuseables/bookmark')+const { normalizeViewport } = require('../../reuseables/normalize-viewport')const {openImageDownloadPanel,closeImageDownloadPanel,- clickDownload,-} = require('../../reuseables/image-download');+ clickDownload+} = require('../../reuseables/image-download')const startParams = ['p=geographic','v=-180,-90,180,90','l=MODIS_Terra_CorrectedReflectance_TrueColor','t=2018-06-01',- 'imageDownload=',-];+ 'imageDownload='+]module.exports = {- after(client) {- client.end();+ after (client) {+ client.end()},- 'In geographic, top two zoom levels are 10km': function(c) {- normalizeViewport(c, 1024, 768);- bookmark(c, startParams);- openImageDownloadPanel(c);- c.expect.element('#wv-image-resolution option[value="40"]').to.be.selected;- closeImageDownloadPanel(c);- zoomIn(c);- openImageDownloadPanel(c);+ 'In geographic, top two zoom levels are 10km': function (c) {+ normalizeViewport(c, 1024, 768)+ bookmark(c, startParams)+ openImageDownloadPanel(c)+ c.expect.element('#wv-image-resolution option[value="40"]').to.be.selected+ closeImageDownloadPanel(c)+ zoomIn(c)+ openImageDownloadPanel(c)- c.expect.element('#wv-image-resolution option[value="40"]').to.be.selected;- closeImageDownloadPanel(c);+ c.expect.element('#wv-image-resolution option[value="40"]').to.be.selected+ closeImageDownloadPanel(c)},- 'Next zoom is 5km': function(c) {- zoomIn(c);- openImageDownloadPanel(c);- c.expect.element('#wv-image-resolution option[value="20"]').to.be.selected;- closeImageDownloadPanel(c);+ 'Next zoom is 5km': function (c) {+ zoomIn(c)+ openImageDownloadPanel(c)+ c.expect.element('#wv-image-resolution option[value="20"]').to.be.selected+ closeImageDownloadPanel(c)},- 'Next two zooms are 1km': function(c) {- zoomIn(c);- openImageDownloadPanel(c);- c.expect.element('#wv-image-resolution option[value="4"]').to.be.selected;- closeImageDownloadPanel(c);- zoomIn(c);- openImageDownloadPanel(c);- c.expect.element('#wv-image-resolution option[value="4"]').to.be.selected;- closeImageDownloadPanel(c);+ 'Next two zooms are 1km': function (c) {+ zoomIn(c)+ openImageDownloadPanel(c)+ c.expect.element('#wv-image-resolution option[value="4"]').to.be.selected+ closeImageDownloadPanel(c)+ zoomIn(c)+ openImageDownloadPanel(c)+ c.expect.element('#wv-image-resolution option[value="4"]').to.be.selected+ closeImageDownloadPanel(c)},- 'Next zoom is 500m': function(c) {- zoomIn(c);- openImageDownloadPanel(c);- c.expect.element('#wv-image-resolution option[value="2"]').to.be.selected;- closeImageDownloadPanel(c);+ 'Next zoom is 500m': function (c) {+ zoomIn(c)+ openImageDownloadPanel(c)+ c.expect.element('#wv-image-resolution option[value="2"]').to.be.selected+ closeImageDownloadPanel(c)},- 'Next two zooms are 250m': function(c) {- zoomIn(c);- openImageDownloadPanel(c);- c.expect.element('#wv-image-resolution option[value="1"]').to.be.selected;- closeImageDownloadPanel(c);- zoomIn(c);- openImageDownloadPanel(c);- c.expect.element('#wv-image-resolution option[value="1"]').to.be.selected;- closeImageDownloadPanel(c);+ 'Next two zooms are 250m': function (c) {+ zoomIn(c)+ openImageDownloadPanel(c)+ c.expect.element('#wv-image-resolution option[value="1"]').to.be.selected+ closeImageDownloadPanel(c)+ zoomIn(c)+ openImageDownloadPanel(c)+ c.expect.element('#wv-image-resolution option[value="1"]').to.be.selected+ closeImageDownloadPanel(c)},- 'Next zoom is 125m': function(c) {- zoomIn(c);- openImageDownloadPanel(c);- c.expect.element('#wv-image-resolution option[value="0.5"]').to.be.selected;- closeImageDownloadPanel(c);+ 'Next zoom is 125m': function (c) {+ zoomIn(c)+ openImageDownloadPanel(c)+ c.expect.element('#wv-image-resolution option[value="0.5"]').to.be.selected+ closeImageDownloadPanel(c)},- 'Next zoom is 60m': function(c) {- zoomIn(c);- openImageDownloadPanel(c);+ 'Next zoom is 60m': function (c) {+ zoomIn(c)+ openImageDownloadPanel(c)c.expect.element('#wv-image-resolution option[value="0.25"]').to.be- .selected;- closeImageDownloadPanel(c);+ .selected+ closeImageDownloadPanel(c)},- 'Next zoom is 30m': function(c) {- zoomIn(c);- openImageDownloadPanel(c);+ 'Next zoom is 30m': function (c) {+ zoomIn(c)+ openImageDownloadPanel(c)c.expect.element('#wv-image-resolution option[value="0.125"]').to.be- .selected;- closeImageDownloadPanel(c);+ .selected+ closeImageDownloadPanel(c)},- 'Last zoom level is 30m': function(c) {+ 'Last zoom level is 30m': function (c) {// mash the zoom button a bunch of times and see if it changesfor (let i = 0; i < 5; i += 1) {- zoomIn(c);+ zoomIn(c)}- openImageDownloadPanel(c);+ openImageDownloadPanel(c)c.expect.element('#wv-image-resolution option[value="0.125"]').to.be- .selected;- closeImageDownloadPanel(c);+ .selected+ closeImageDownloadPanel(c)},- 'Click download': function(c) {- openImageDownloadPanel(c);- clickDownload(c);+ 'Click download': function (c) {+ openImageDownloadPanel(c)+ clickDownload(c)c.getAttribute('#wv-image-download-url', 'url', (result) => {// See if the bounding box here is reasonable. Should be centered// on 0,0 and not be wider than 0.1 degrees- const matcher = /BBOX=([^,]+),([^,]+),([^,]+),([^&]+)/;- const matches = matcher.exec(result.value);- const lat0 = Number.parseFloat(matches[1]);- const lon0 = Number.parseFloat(matches[2]);- const lat1 = Number.parseFloat(matches[3]);- const lon1 = Number.parseFloat(matches[4]);- c.assert.ok(lat0 < 0 && lat0 > -0.1);- c.assert.ok(lon0 < 0 && lon0 > -0.1);- c.assert.ok(lat1 > 0 && lat1 < 0.1);- c.assert.ok(lon1 > 0 && lon1 < 0.1);- });- },-};+ const matcher = /BBOX=([^,]+),([^,]+),([^,]+),([^&]+)/+ const matches = matcher.exec(result.value)+ const lat0 = Number.parseFloat(matches[1])+ const lon0 = Number.parseFloat(matches[2])+ const lat1 = Number.parseFloat(matches[3])+ const lon1 = Number.parseFloat(matches[4])+ c.assert.ok(lat0 < 0 && lat0 > -0.1)+ c.assert.ok(lon0 < 0 && lon0 > -0.1)+ c.assert.ok(lat1 > 0 && lat1 < 0.1)+ c.assert.ok(lon1 > 0 && lon1 < 0.1)+ })+ }+}diff --git a/e2e/features/image-download/time-test.js b/e2e/features/image-download/time-test.jsindex b799ccc17..27a8ffef9 100644--- a/e2e/features/image-download/time-test.js+++ b/e2e/features/image-download/time-test.js@@ -1,47 +1,47 @@-const { bookmark } = require('../../reuseables/bookmark');+const { bookmark } = require('../../reuseables/bookmark')const {openImageDownloadPanel,closeImageDownloadPanel,- clickDownload,-} = require('../../reuseables/image-download');+ clickDownload+} = require('../../reuseables/image-download')const startParams = [- 'imageDownload=',-];+ 'imageDownload='+]module.exports = {- after(client) {- client.end();+ after (client) {+ client.end()},- 'Image for today': function(c) {- bookmark(c, startParams.concat(['now=2018-06-01T3']));- openImageDownloadPanel(c);- clickDownload(c);+ 'Image for today': function (c) {+ bookmark(c, startParams.concat(['now=2018-06-01T3']))+ openImageDownloadPanel(c)+ clickDownload(c)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .and.to.contain('TIME=2018-06-01');- closeImageDownloadPanel(c);+ .and.to.contain('TIME=2018-06-01')+ closeImageDownloadPanel(c)},// Don't show 'today' until three hours after (when the latency// catches up)- 'Image for yesterday': function(c) {- bookmark(c, startParams.concat(['now=2018-06-01T0']));- openImageDownloadPanel(c);- clickDownload(c);+ 'Image for yesterday': function (c) {+ bookmark(c, startParams.concat(['now=2018-06-01T0']))+ openImageDownloadPanel(c)+ clickDownload(c)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .and.to.contain('TIME=2018-05-31');- closeImageDownloadPanel(c);+ .and.to.contain('TIME=2018-05-31')+ closeImageDownloadPanel(c)},- 'Image for 2018-05-15': function(c) {- bookmark(c, startParams.concat(['t=2018-05-15']));- openImageDownloadPanel(c);- clickDownload(c);+ 'Image for 2018-05-15': function (c) {+ bookmark(c, startParams.concat(['t=2018-05-15']))+ openImageDownloadPanel(c)+ clickDownload(c)c.expect.element('#wv-image-download-url').to.have.attribute('url')- .and.to.contain('TIME=2018-05-15');- closeImageDownloadPanel(c);- },+ .and.to.contain('TIME=2018-05-15')+ closeImageDownloadPanel(c)+ }-};+}diff --git a/e2e/features/image-download/unsupported-test.js b/e2e/features/image-download/unsupported-test.jsindex bbe0da154..e8115006e 100644--- a/e2e/features/image-download/unsupported-test.js+++ b/e2e/features/image-download/unsupported-test.js@@ -1,60 +1,60 @@-const { bookmark } = require('../../reuseables/bookmark');-const { closeImageDownloadPanel } = require('../../reuseables/image-download');+const { bookmark } = require('../../reuseables/bookmark')+const { closeImageDownloadPanel } = require('../../reuseables/image-download')-const startParams = ['v=-180,-90,180,90', 't=2018-06-01', 'imageDownload='];+const startParams = ['v=-180,-90,180,90', 't=2018-06-01', 'imageDownload=']-const TIME_WAIT = 10000;+const TIME_WAIT = 10000module.exports = {- after(client) {- client.end();+ after (client) {+ client.end()},- 'Custom palettes are not supported dialog': function(c) {- bookmark(c, startParams.concat(['l=MODIS_Terra_Aerosol(palette=red_1)']));- c.click('#wv-image-button');- c.waitForElementVisible('.notify', TIME_WAIT);+ 'Custom palettes are not supported dialog': function (c) {+ bookmark(c, startParams.concat(['l=MODIS_Terra_Aerosol(palette=red_1)']))+ c.click('#wv-image-button')+ c.waitForElementVisible('.notify', TIME_WAIT)},- 'Custom palettes: Cancel button': function(c) {- c.click('.cancel-notify');- c.pause(1000);- c.expect.element('.notify').to.not.be.present;- c.expect.element('#toolbar_snapshot').to.not.be.present;+ 'Custom palettes: Cancel button': function (c) {+ c.click('.cancel-notify')+ c.pause(1000)+ c.expect.element('.notify').to.not.be.present+ c.expect.element('#toolbar_snapshot').to.not.be.present},- 'Custom palettes: OK button brings up download panel': function(c) {- c.click('#wv-image-button');- c.waitForElementVisible('.notify', TIME_WAIT);- c.click('.accept-notify');- c.pause(1000);- c.expect.element('.notify').to.not.be.present;- c.waitForElementPresent('#toolbar_snapshot', TIME_WAIT);- c.pause(500);- closeImageDownloadPanel(c);+ 'Custom palettes: OK button brings up download panel': function (c) {+ c.click('#wv-image-button')+ c.waitForElementVisible('.notify', TIME_WAIT)+ c.click('.accept-notify')+ c.pause(1000)+ c.expect.element('.notify').to.not.be.present+ c.waitForElementPresent('#toolbar_snapshot', TIME_WAIT)+ c.pause(500)+ closeImageDownloadPanel(c)},- 'Rotation is not supported dialog': function(c) {- bookmark(c, startParams.concat(['p=arctic', 'r=18']));- c.click('#wv-image-button');- c.waitForElementVisible('.notify', TIME_WAIT);+ 'Rotation is not supported dialog': function (c) {+ bookmark(c, startParams.concat(['p=arctic', 'r=18']))+ c.click('#wv-image-button')+ c.waitForElementVisible('.notify', TIME_WAIT)},- 'Rotation: Cancel button': function(c) {- c.click('.cancel-notify');- c.pause(1000);- c.expect.element('.notify').to.not.be.present;- c.expect.element('#toolbar_snapshot').to.not.be.present;+ 'Rotation: Cancel button': function (c) {+ c.click('.cancel-notify')+ c.pause(1000)+ c.expect.element('.notify').to.not.be.present+ c.expect.element('#toolbar_snapshot').to.not.be.present},- 'Rotation: OK button brings up download panel': function(c) {- c.click('#wv-image-button');- c.waitForElementVisible('.notify', TIME_WAIT);- c.click('.accept-notify');- c.pause(1000);- c.expect.element('.notify').to.not.be.present;- c.waitForElementPresent('#toolbar_snapshot', TIME_WAIT);- c.pause(500);- closeImageDownloadPanel(c);- },-};+ 'Rotation: OK button brings up download panel': function (c) {+ c.click('#wv-image-button')+ c.waitForElementVisible('.notify', TIME_WAIT)+ c.click('.accept-notify')+ c.pause(1000)+ c.expect.element('.notify').to.not.be.present+ c.waitForElementPresent('#toolbar_snapshot', TIME_WAIT)+ c.pause(500)+ closeImageDownloadPanel(c)+ }+}diff --git a/e2e/features/layers/layer-picker-mobile-test.js b/e2e/features/layers/layer-picker-mobile-test.jsindex 1506c44b4..402c250d5 100644--- a/e2e/features/layers/layer-picker-mobile-test.js+++ b/e2e/features/layers/layer-picker-mobile-test.js@@ -1,5 +1,5 @@-const skipTour = require('../../reuseables/skip-tour.js');-const { assertCategories, assertDefaultLayers } = require('../../reuseables/layer-picker.js');+const skipTour = require('../../reuseables/skip-tour.js')+const { assertCategories, assertDefaultLayers } = require('../../reuseables/layer-picker.js')const {availableFacetLabel,@@ -38,148 +38,148 @@ const {measurementTemperatureLabel,sourcesMERRALabel,applyButton,- resetButton,-} = require('../../reuseables/selectors.js');+ resetButton+} = require('../../reuseables/selectors.js')-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {before: (c) => {- skipTour.loadAndSkipTour(c, TIME_LIMIT);- c.url(`${c.globals.url}?t=2013-05-15`);- c.setWindowSize(375, 667); // iPhone 6/7/8 dimensions+ skipTour.loadAndSkipTour(c, TIME_LIMIT)+ c.url(`${c.globals.url}?t=2013-05-15`)+ c.setWindowSize(375, 667) // iPhone 6/7/8 dimensions},'Initial state indicates layer count': (c) => {c.waitForElementVisible(collapsedLayerButton, TIME_LIMIT, (e) => {- c.expect.element(layerCount).to.be.present;- c.assert.containsText(layerCount, '7');- });+ c.expect.element(layerCount).to.be.present+ c.assert.containsText(layerCount, '7')+ })},'Expand layer list and show default layers': (c) => {- c.click(collapsedLayerButton);- c.waitForElementVisible(layerContainer, TIME_LIMIT, assertDefaultLayers(c));+ c.click(collapsedLayerButton)+ c.waitForElementVisible(layerContainer, TIME_LIMIT, assertDefaultLayers(c))},'Open product picker and show categories by default': (c) => {- c.click(addLayers);- c.waitForElementVisible('.categories-dropdown-header', TIME_LIMIT, assertCategories(c));+ c.click(addLayers)+ c.waitForElementVisible('.categories-dropdown-header', TIME_LIMIT, assertCategories(c))},'Clicking a measurement shows choices, indicates unavailability': (c) => {- c.click(aodAllMeasurement);+ c.click(aodAllMeasurement)c.waitForElementVisible(aodAllMeasurementContents, TIME_LIMIT, (e) => {- c.expect.element(sourceMetadataCollapsed).to.be.present;+ c.expect.element(sourceMetadataCollapsed).to.be.present// Checkboxes for two layers are visible- c.expect.element(aodCheckboxMODIS).to.be.present;- c.expect.element(aodCheckboxMAIAC).to.be.present;+ c.expect.element(aodCheckboxMODIS).to.be.present+ c.expect.element(aodCheckboxMAIAC).to.be.present// Indicate that MODIS Combined layer has no available coverage- c.expect.element(`${aodCheckboxMODIS} + svg#availability-info`).to.be.present;+ c.expect.element(`${aodCheckboxMODIS} + svg#availability-info`).to.be.present// Indicate that MAIAC layer has no available coverage- c.expect.element(`${aodCheckboxMAIAC} + svg#availability-info`).to.be.present;- c.expect.elements(sourceTabs).count.to.equal(8);- });+ c.expect.element(`${aodCheckboxMAIAC} + svg#availability-info`).to.be.present+ c.expect.elements(sourceTabs).count.to.equal(8)+ })},'Available grid source layer measuremet does not have unavaiable coverage class': (c) => {// swith to Aqua/MODIS measurement nav item- c.click(aquaTerraMODISTab);- c.pause(500);- c.click(aquaModisTab);+ c.click(aquaTerraMODISTab)+ c.pause(500)+ c.click(aquaModisTab)c.waitForElementVisible(aodTabContentAquaMODIS, TIME_LIMIT, (e) => {- c.expect.element(aodCheckbox).to.be.present;+ c.expect.element(aodCheckbox).to.be.present// Avaialable layer does not have unavailable class- c.assert.not.cssClassPresent(aodCheckbox, 'unavailable');+ c.assert.not.cssClassPresent(aodCheckbox, 'unavailable')// switch back to previous 'Aqua and Terra/MODIS' measurement nav item- c.click(aquaTerraMODISTab);- });+ c.click(aquaTerraMODISTab)+ })},'Expanding measurement details': (c) => {- c.click('.ellipsis');+ c.click('.ellipsis')c.waitForElementVisible(sourceMetadataExpanded, TIME_LIMIT, (e) => {// c.pause(30000);- c.assert.containsText(aquaTerraModisHeader, 'About Aerosol Optical Depth (AOD)');+ c.assert.containsText(aquaTerraModisHeader, 'About Aerosol Optical Depth (AOD)')// c.assert.containsText(maiacHeader, 'MAIAC Aerosol Optical Depth');// c.expect.elements('.source-metadata > p').count.to.equal(10);- c.expect.element('.ellipsis.up').to.be.present;- });+ c.expect.element('.ellipsis.up').to.be.present+ })},'Collapsing measurement details': (c) => {- c.click('.ellipsis.up').pause(250);- c.assert.cssClassPresent('.source-metadata', 'overflow');+ c.click('.ellipsis.up').pause(250)+ c.assert.cssClassPresent('.source-metadata', 'overflow')},'Switching source tabs': (c) => {- c.click(aquaModisTab).pause(250);- c.expect.element(aodCheckbox).to.be.present;- c.expect.element('h3#aboutaerosolopticaldepthaod').to.be.present;- c.assert.containsText('h3#aboutaerosolopticaldepthaod', 'About Aerosol Optical Depth (AOD)');- c.click(aodCheckbox);+ c.click(aquaModisTab).pause(250)+ c.expect.element(aodCheckbox).to.be.present+ c.expect.element('h3#aboutaerosolopticaldepthaod').to.be.present+ c.assert.containsText('h3#aboutaerosolopticaldepthaod', 'About Aerosol Optical Depth (AOD)')+ c.click(aodCheckbox)},'Back button returns to categories': (c) => {- c.click(layerPickerBackButton);- c.waitForElementVisible('.categories-dropdown-header', TIME_LIMIT, assertCategories(c));+ c.click(layerPickerBackButton)+ c.waitForElementVisible('.categories-dropdown-header', TIME_LIMIT, assertCategories(c))},'Swtich to facet view and confirm applying facets limits results': (c) => {- c.click(filterButton);+ c.click(filterButton)c.waitForElementVisible('.facet-container', TIME_LIMIT, (e) => {- c.click(availableFacetLabel);- c.click(categoryAtmosphereLabel);+ c.click(availableFacetLabel)+ c.click(categoryAtmosphereLabel)// Collapse a set and confirm it hides- c.click(categoryFacetCollapseToggle);- c.expect.element(categoryFacetChoicesContainer).to.not.be.present;+ c.click(categoryFacetCollapseToggle)+ c.expect.element(categoryFacetChoicesContainer).to.not.be.present// + More button adds 10 choices- c.expect.elements(measurementFacetChoices).count.to.equal(5);- c.click(measurementMoreButton);- c.expect.elements(measurementFacetChoices).count.to.equal(15);+ c.expect.elements(measurementFacetChoices).count.to.equal(5)+ c.click(measurementMoreButton)+ c.expect.elements(measurementFacetChoices).count.to.equal(15)- c.click(measurementTemperatureLabel);- c.click(sourcesMERRALabel);- c.click(applyButton);+ c.click(measurementTemperatureLabel)+ c.click(sourcesMERRALabel)+ c.click(applyButton)c.waitForElementVisible(layerSearchList, TIME_LIMIT, (e) => {- c.expect.elements(layersSearchRow).count.to.equal(4);- });- c.click(resetButton);- });+ c.expect.elements(layersSearchRow).count.to.equal(4)+ })+ c.click(resetButton)+ })},'Searching for layers': (c) => {- c.setValue(layersSearchField, 'aerosol optical depth');+ c.setValue(layersSearchField, 'aerosol optical depth')c.waitForElementVisible(layerSearchList, TIME_LIMIT, (e) => {- c.expect.elements(layersSearchRow).count.to.equal(17);- c.assert.attributeEquals('.search-row .checked input', 'id', 'MODIS_Aqua_Aerosol-checkbox');- });+ c.expect.elements(layersSearchRow).count.to.equal(17)+ c.assert.attributeEquals('.search-row .checked input', 'id', 'MODIS_Aqua_Aerosol-checkbox')+ })},'Viewing details for search results': (c) => {- c.click(aodSearchRow);+ c.click(aodSearchRow)c.waitForElementVisible(layerDetails, TIME_LIMIT, (e) => {- c.assert.containsText(layerDetailHeader, 'Aerosol Optical Depth');- c.assert.containsText(addToMapButton, 'Remove Layer');- });+ c.assert.containsText(layerDetailHeader, 'Aerosol Optical Depth')+ c.assert.containsText(addToMapButton, 'Remove Layer')+ })},'Add to layer button and checkbox are in sync': (c) => {// Remove the layer- c.click(addToMapButton).pause(200);- c.assert.not.cssClassPresent(aodSearchCheckbox, 'checked');- c.assert.containsText(addToMapButton, 'Add Layer');+ c.click(addToMapButton).pause(200)+ c.assert.not.cssClassPresent(aodSearchCheckbox, 'checked')+ c.assert.containsText(addToMapButton, 'Add Layer')// Add it again- c.click(aodCheckbox).pause(200);- c.assert.containsText(addToMapButton, 'Remove Layer');- c.assert.cssClassPresent(aodSearchCheckbox, 'checked');+ c.click(aodCheckbox).pause(200)+ c.assert.containsText(addToMapButton, 'Remove Layer')+ c.assert.cssClassPresent(aodSearchCheckbox, 'checked')},'Clicking the selected row deselects it and hides the details': (c) => {- c.click(aodSearchRow).pause(300);- c.expect.element(layerDetails).to.not.be.present;- c.assert.not.cssClassPresent(aodSearchRow, 'selected');- c.click(aodSearchRow).pause(300);- c.assert.cssClassPresent(aodSearchRow, 'selected');+ c.click(aodSearchRow).pause(300)+ c.expect.element(layerDetails).to.not.be.present+ c.assert.not.cssClassPresent(aodSearchRow, 'selected')+ c.click(aodSearchRow).pause(300)+ c.assert.cssClassPresent(aodSearchRow, 'selected')},'Close product picker and confirm added layers show in sidebar': (c) => {- c.click(layersModalCloseButton).pause(200);- c.expect.element('#active-MODIS_Aqua_Aerosol').to.be.present;+ c.click(layersModalCloseButton).pause(200)+ c.expect.element('#active-MODIS_Aqua_Aerosol').to.be.present},'Collapse sidebar and confirm layer count updated': (c) => {- c.click('#toggleIconHolder').pause(200);- c.expect.element(layerCount).to.be.present;- c.assert.containsText(layerCount, '8');+ c.click('#toggleIconHolder').pause(200)+ c.expect.element(layerCount).to.be.present+ c.assert.containsText(layerCount, '8')},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/layers/layer-picker-test.js b/e2e/features/layers/layer-picker-test.jsindex 78b7f5e01..eb95e186b 100644--- a/e2e/features/layers/layer-picker-test.js+++ b/e2e/features/layers/layer-picker-test.js@@ -1,6 +1,6 @@-const { assertCategories } = require('../../reuseables/layer-picker.js');-const { switchProjection } = require('../../reuseables/switch-projection');-const skipTour = require('../../reuseables/skip-tour.js');+const { assertCategories } = require('../../reuseables/layer-picker.js')+const { switchProjection } = require('../../reuseables/switch-projection')+const skipTour = require('../../reuseables/skip-tour.js')const {collapsedLayerButton,layersSearchField,@@ -40,136 +40,136 @@ const {aodMAIACSidebarLayer,yearDown,monthDown,- dayDown,-} = require('../../reuseables/selectors.js');+ dayDown+} = require('../../reuseables/selectors.js')-const aodChoices = '#accordion-atmosphere-aerosol-optical-depth .measure-row-contents';+const aodChoices = '#accordion-atmosphere-aerosol-optical-depth .measure-row-contents'-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {before: (c) => {- skipTour.loadAndSkipTour(c, TIME_LIMIT);- c.url(`${c.globals.url}?t=2013-05-15`);+ skipTour.loadAndSkipTour(c, TIME_LIMIT)+ c.url(`${c.globals.url}?t=2013-05-15`)},'Layer picker shows categories when first opened': (c) => {- c.click(addLayers);- c.waitForElementVisible(categoriesNav, TIME_LIMIT, assertCategories(c));+ c.click(addLayers)+ c.waitForElementVisible(categoriesNav, TIME_LIMIT, assertCategories(c))},'Enabled Corrected Reflectance layers are shown as checked': (c) => {- c.click(allCategoryHeader);+ c.click(allCategoryHeader)c.waitForElementVisible(layerBrowseList, TIME_LIMIT, (e) => {- c.click('#accordion-legacy-all-corrected-reflectance');+ c.click('#accordion-legacy-all-corrected-reflectance')c.waitForElementVisible(correctedReflectanceCheckboxContainer, TIME_LIMIT, (e) => {- c.expect.element(correctedReflectanceChecked).to.be.present;- });- });+ c.expect.element(correctedReflectanceChecked).to.be.present+ })+ })},'"Unavailable" layers show unavailable icon and tooltip': (c) => {- c.click('#landsat-weld-1-source-Nav');+ c.click('#landsat-weld-1-source-Nav')c.waitForElementVisible(weldReflectanceCheckboxContainer, TIME_LIMIT, (e) => {c.moveToElement(weldUnavailableTooltipIcon, 2, 2, (e) => {c.waitForElementVisible('.tooltip', TIME_LIMIT, (e) => {- c.expect.element('.tooltip').to.be.present;- });- });- });+ c.expect.element('.tooltip').to.be.present+ })+ })+ })},'Entering search text transitions to search mode': (c) => {- c.setValue(layersSearchField, 'ozone');+ c.setValue(layersSearchField, 'ozone')c.waitForElementVisible(layerSearchList, TIME_LIMIT, (e) => {- c.expect.elements(layersSearchRow).count.to.equal(6);- });+ c.expect.elements(layersSearchRow).count.to.equal(6)+ })},'Updating input changes results': (c) => {- c.clearValue(layersSearchField);- c.setValue(layersSearchField, 'ozone day');+ c.clearValue(layersSearchField)+ c.setValue(layersSearchField, 'ozone day')c.waitForElementVisible(layerSearchList, TIME_LIMIT, (e) => {- c.expect.elements(layersSearchRow).count.to.equal(1);- });+ c.expect.elements(layersSearchRow).count.to.equal(1)+ })},'Selecting a row shows the detail panel': (c) => {- c.click('#MLS_O3_46hPa_Day-search-row');+ c.click('#MLS_O3_46hPa_Day-search-row')c.waitForElementVisible(layerDetails, TIME_LIMIT, (e) => {- c.expect.element(layerDetailHeader).to.be.present;- });+ c.expect.element(layerDetailHeader).to.be.present+ })},'Add layer button and list item checbox are in sync': (c) => {- const checkBox = '.search-row.layers-all-layer.selected .wv-checkbox';- c.click(addToMapButton);- c.pause(200);- c.assert.cssClassPresent(checkBox, 'checked');- c.assert.containsText(addToMapButton, 'Remove Layer');- c.click(checkBox);- c.pause(200);- c.assert.containsText(addToMapButton, 'Add Layer');- c.assert.not.cssClassPresent(checkBox, 'checked');+ const checkBox = '.search-row.layers-all-layer.selected .wv-checkbox'+ c.click(addToMapButton)+ c.pause(200)+ c.assert.cssClassPresent(checkBox, 'checked')+ c.assert.containsText(addToMapButton, 'Remove Layer')+ c.click(checkBox)+ c.pause(200)+ c.assert.containsText(addToMapButton, 'Add Layer')+ c.assert.not.cssClassPresent(checkBox, 'checked')},'Search for "nothing" returns no results': (c) => {- c.clearValue(layersSearchField);- c.setValue(layersSearchField, 'nothing');+ c.clearValue(layersSearchField)+ c.setValue(layersSearchField, 'nothing')c.waitForElementVisible('.no-results', TIME_LIMIT, (e) => {- c.assert.containsText('.no-results', 'No layers found!');- });+ c.assert.containsText('.no-results', 'No layers found!')+ })},'"Available 2013 May 15" filter removes items not available from list, adds a chip': (c) => {- c.clearValue(layersSearchField);- c.setValue(layersSearchField, '(True');+ c.clearValue(layersSearchField)+ c.setValue(layersSearchField, '(True')c.moveToElement(coverageTooltipIcon, 2, 2, (e) => {c.waitForElementVisible('.tooltip', TIME_LIMIT, (e) => {- c.expect.element('.tooltip').to.be.present;+ c.expect.element('.tooltip').to.be.present// Move cursor off tooltip so it fades- c.moveToElement(layerPickerBackButton, 2, 2);- c.pause(1500);- });- });+ c.moveToElement(layerPickerBackButton, 2, 2)+ c.pause(1500)+ })+ })- c.click(availableFilterCheckbox);+ c.click(availableFilterCheckbox)c.waitForElementVisible(layerSearchList, TIME_LIMIT, (e) => {- c.expect.elements(layersSearchRow).count.to.equal(4);- c.assert.containsText(layerResultsCountText, 'Showing 4 out of');- c.expect.element('.bag-o-chips').to.be.present;- c.expect.elements('.filter-chip').count.to.equal(1);- });+ c.expect.elements(layersSearchRow).count.to.equal(4)+ c.assert.containsText(layerResultsCountText, 'Showing 4 out of')+ c.expect.element('.bag-o-chips').to.be.present+ c.expect.elements('.filter-chip').count.to.equal(1)+ })},'Closing and reopening layer picker restores state.': (c) => {// First, select a row and confirm details are showing- c.click(layersSearchRow);+ c.click(layersSearchRow)c.waitForElementVisible(layerDetailHeader, TIME_LIMIT, (e) => {- c.assert.containsText(layerDetailHeader, 'Corrected Reflectance');+ c.assert.containsText(layerDetailHeader, 'Corrected Reflectance')// Close the modal- c.click(layersModalCloseButton);- c.expect.element(layersAll).to.not.be.present;+ c.click(layersModalCloseButton)+ c.expect.element(layersAll).to.not.be.present// Now reopen modal and confirm state is just as we left it- c.click(addLayers);+ c.click(addLayers)c.waitForElementVisible(layerSearchList, TIME_LIMIT, (e) => {- c.expect.elements(layersSearchRow).count.to.equal(4);+ c.expect.elements(layersSearchRow).count.to.equal(4)c.assert- .containsText(layerResultsCountText, 'Showing 4 out of');- c.expect.element(layerDetails).to.be.present;- c.assert.containsText(layerDetailHeader, 'Corrected Reflectance');- c.expect.element(layerDetailsDateRange).to.be.present;- c.expect.element('.bag-o-chips').to.be.present;- c.expect.elements('.filter-chip').count.to.equal(1);- });- });+ .containsText(layerResultsCountText, 'Showing 4 out of')+ c.expect.element(layerDetails).to.be.present+ c.assert.containsText(layerDetailHeader, 'Corrected Reflectance')+ c.expect.element(layerDetailsDateRange).to.be.present+ c.expect.element('.bag-o-chips').to.be.present+ c.expect.elements('.filter-chip').count.to.equal(1)+ })+ })},'Changing app date is reflected in coverage facets': (c) => {// Close the modal- c.click(layersModalCloseButton);+ c.click(layersModalCloseButton)// Change the date 2012-4-14- c.click(yearDown);- c.click(monthDown);- c.click(dayDown);+ c.click(yearDown)+ c.click(monthDown)+ c.click(dayDown)- c.click(addLayers);+ c.click(addLayers)// Confirm available facet still enabled but date changed- c.assert.containsText(availableFilterTextEl, 'Available 2012 APR 14');- c.expect.element(availableFilterCheckboxInput).to.be.selected;+ c.assert.containsText(availableFilterTextEl, 'Available 2012 APR 14')+ c.expect.element(availableFilterCheckboxInput).to.be.selected},'Disabling coverage filter updates list': (c) => {c.click(availableFilterCheckbox);@@ -181,115 +181,115 @@ module.exports = {.containsText(layerResultsCountText, 'Showing 10 out of');},'Finding layer by ID with search': (c) => {- c.clearValue(layersSearchField);- c.pause(1000);+ c.clearValue(layersSearchField)+ c.pause(1000)c.setValue(layersSearchField,- 'MERRA2_Total_Aerosol_Optical_Thickness_550nm_Scattering_Monthly',- );+ 'MERRA2_Total_Aerosol_Optical_Thickness_550nm_Scattering_Monthly'+ )c.waitForElementVisible(layersSearchRow, TIME_LIMIT, (e) => {- c.assert.containsText(layersAll, 'Total Aerosol Optical Thickness Scattering 550nm');- c.assert.containsText(layersAll, 'MERRA-2');- });+ c.assert.containsText(layersAll, 'Total Aerosol Optical Thickness Scattering 550nm')+ c.assert.containsText(layersAll, 'MERRA-2')+ })},'Back button returns to main selection but retains search input': (c) => {c.waitForElementVisible(layerPickerBackButton, TIME_LIMIT, (e) => {- c.click(layerPickerBackButton);+ c.click(layerPickerBackButton)c.getValue(layersSearchField, (result) => {- c.assert.equal(result.value, 'MERRA2_Total_Aerosol_Optical_Thickness_550nm_Scattering_Monthly');- c.waitForElementVisible(categoriesNav, TIME_LIMIT, assertCategories(c));- });- });+ c.assert.equal(result.value, 'MERRA2_Total_Aerosol_Optical_Thickness_550nm_Scattering_Monthly')+ c.waitForElementVisible(categoriesNav, TIME_LIMIT, assertCategories(c))+ })+ })},'Switching to "Science Disciplines" tab updates category/measurement choices': (c) => {- c.click(scienceDisciplinesTab);- c.expect.element('#scientific-all').to.be.present;- c.expect.element('#atmosphere').to.be.present;- c.expect.element('#biosphere').to.be.present;- c.expect.element('#cryosphere').to.be.present;- c.expect.element('#human-dimensions').to.be.present;- c.expect.element('#land-surface').to.be.present;- c.expect.element('#oceans').to.be.present;- c.expect.element('#spectral-engineering').to.be.present;- c.expect.element('#terrestrial-hydrosphere').to.be.present;- c.expect.element('#scientific-other').to.be.present;+ c.click(scienceDisciplinesTab)+ c.expect.element('#scientific-all').to.be.present+ c.expect.element('#atmosphere').to.be.present+ c.expect.element('#biosphere').to.be.present+ c.expect.element('#cryosphere').to.be.present+ c.expect.element('#human-dimensions').to.be.present+ c.expect.element('#land-surface').to.be.present+ c.expect.element('#oceans').to.be.present+ c.expect.element('#spectral-engineering').to.be.present+ c.expect.element('#terrestrial-hydrosphere').to.be.present+ c.expect.element('#scientific-other').to.be.present},'Selecting a measurement from the grid shows sources and details for first source': (c) => {- c.click(aodMeasurement);+ c.click(aodMeasurement)c.waitForElementVisible(aodMeasurementContents, TIME_LIMIT, (e) => {c.waitForElementVisible(layerBrowseDetail, TIME_LIMIT, (e) => {c.assert- .containsText(layerDetailHeader, 'Aqua and Terra/MODIS');+ .containsText(layerDetailHeader, 'Aqua and Terra/MODIS')// Checkboxes for two layers are visible- c.expect.element(aodCheckboxMODIS).to.be.present;- c.expect.element(aodCheckboxMAIAC).to.be.present;+ c.expect.element(aodCheckboxMODIS).to.be.present+ c.expect.element(aodCheckboxMAIAC).to.be.present// Indicate that MODIS Combined layer has no available coverage- c.expect.element(`${aodCheckboxMODIS} + svg#availability-info`).to.be.present;+ c.expect.element(`${aodCheckboxMODIS} + svg#availability-info`).to.be.present// Indicate that MAIAC layer has no available coverage- c.expect.element(`${aodCheckboxMAIAC} + svg#availability-info`).to.be.present;- });- });+ c.expect.element(`${aodCheckboxMAIAC} + svg#availability-info`).to.be.present+ })+ })},'Available grid source layer measuremet does not have unavaiable coverage icon': (c) => {// swith to Aqua/MODIS measurement nav item- c.click(aquaModisTab);+ c.click(aquaModisTab)c.waitForElementVisible(aodTabContentAquaMODIS, TIME_LIMIT, (e) => {c.assert- .containsText(layerDetailHeader, 'Aqua/MODIS');+ .containsText(layerDetailHeader, 'Aqua/MODIS')// Checkboxes for layer is visible- c.expect.element(aodCheckboxAquaMODIS).to.be.present;+ c.expect.element(aodCheckboxAquaMODIS).to.be.present// Avaialable layer does not have unavailable icon- c.expect.element(`${aodCheckboxMODIS} + svg#availability-info`).to.not.be.present;+ c.expect.element(`${aodCheckboxMODIS} + svg#availability-info`).to.not.be.present// switch back to previous 'Aqua and Terra/MODIS' measurement nav item- c.click(aquaTerraMODISTab);- });+ c.click(aquaTerraMODISTab)+ })},'Selecting layers from product picker adds them to the sidebar/map': (c) => {c.waitForElementVisible(aodChoices, TIME_LIMIT, (e) => {- c.click(aodCheckboxMODIS);- c.click(aodCheckboxMAIAC);+ c.click(aodCheckboxMODIS)+ c.click(aodCheckboxMAIAC)// Reset to category mode view for future test- c.click(layerPickerBackButton);- c.click(layersModalCloseButton);- c.expect.element(aodSidebarLayer).to.be.present;- c.expect.element(aodMAIACSidebarLayer).to.be.present;- });+ c.click(layerPickerBackButton)+ c.click(layersModalCloseButton)+ c.expect.element(aodSidebarLayer).to.be.present+ c.expect.element(aodMAIACSidebarLayer).to.be.present+ })},'Collapsed sidebar shows updated layer count': (c) => {- c.click('#toggleIconHolder');- c.assert.containsText('.layer-count', '9 Layers');- c.click(collapsedLayerButton);+ c.click('#toggleIconHolder')+ c.assert.containsText('.layer-count', '9 Layers')+ c.click(collapsedLayerButton)},'When switching arctic projection, go straight to measurements browse list if previously in category mode': (c) => {// Switch projection and confirm measurement view- switchProjection(c, 'arctic');- c.pause(100);+ switchProjection(c, 'arctic')+ c.pause(100)c.click(addLayers).waitForElementVisible(layerBrowseList, TIME_LIMIT, (e) => {- c.expect.element(layerBrowseDetail).to.be.present;- c.assert.containsText('.no-results', 'Select a measurement to view details here!');- });+ c.expect.element(layerBrowseDetail).to.be.present+ c.assert.containsText('.no-results', 'Select a measurement to view details here!')+ })},'Searching in arctic projection': (c) => {- c.setValue(layersSearchField, 'sea');+ c.setValue(layersSearchField, 'sea')c.waitForElementVisible(layerSearchList, TIME_LIMIT, (e) => {- c.expect.elements(layersSearchRow).count.to.equal(15);- c.assert.containsText(layerResultsCountText, 'Showing 15 out of');- c.click(layerPickerBackButton);+ c.expect.elements(layersSearchRow).count.to.equal(15)+ c.assert.containsText(layerResultsCountText, 'Showing 15 out of')+ c.click(layerPickerBackButton)c.waitForElementVisible(layerBrowseList, TIME_LIMIT, (e) => {- c.expect.element(layerBrowseDetail).to.be.present;- });- c.click(layersModalCloseButton);- });+ c.expect.element(layerBrowseDetail).to.be.present+ })+ c.click(layersModalCloseButton)+ })},'Switching back to geographic projetion, categories appear': (c) => {- switchProjection(c, 'geographic');- c.click(addLayers);- c.waitForElementVisible(categoriesNav, TIME_LIMIT, assertCategories(c));+ switchProjection(c, 'geographic')+ c.click(addLayers)+ c.waitForElementVisible(categoriesNav, TIME_LIMIT, assertCategories(c))},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/layers/layers-sidebar-test.js b/e2e/features/layers/layers-sidebar-test.jsindex 61533561f..193ebf79d 100644--- a/e2e/features/layers/layers-sidebar-test.js+++ b/e2e/features/layers/layers-sidebar-test.js@@ -1,5 +1,5 @@-const { loadAndSkipTour } = require('../../reuseables/skip-tour.js');-const { checkElementOrdering } = require('../../reuseables/check-element-ordering.js');+const { loadAndSkipTour } = require('../../reuseables/skip-tour.js')+const { checkElementOrdering } = require('../../reuseables/check-element-ordering.js')const {infoButton,infoDialog,@@ -29,186 +29,185 @@ const {layerVisible,sidebarContainer,groupedOverlaysAllLayers,- firesGroupHeader,-} = require('../../reuseables/selectors.js');+ firesGroupHeader+} = require('../../reuseables/selectors.js')-const vectorsQueryString = '?v=-70.43215000968726,28.678203599725197,-59.81569241792232,31.62330063930118&l=GRanD_Dams,Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor';-const TIME_LIMIT = 10000;-const someGroupsQueryString = '?l=MODIS_Combined_Value_Added_AOD,MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth,Reference_Labels_15m(hidden),Reference_Features_15m,MODIS_Terra_CorrectedReflectance_TrueColor&lg=true';-const twoGroupsQueryString = '?v=-107.15747724134027,-81.6706340523014,47.81381180183274,89.12472754295932&l=VIIRS_SNPP_Thermal_Anomalies_375m_All,VIIRS_NOAA20_Thermal_Anomalies_375m_All,MODIS_Combined_Value_Added_AOD,MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth,Reference_Features_15m,MODIS_Terra_CorrectedReflectance_TrueColor&lg=true';-const mixedLayersGroupsDisabledQueryString = '?v=-107.15747724134027,-81.6706340523014,47.81381180183274,89.12472754295932&l=Reference_Features_15m,VIIRS_SNPP_Thermal_Anomalies_375m_All,MODIS_Combined_Value_Added_AOD,VIIRS_NOAA20_Thermal_Anomalies_375m_All,MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth,MODIS_Terra_CorrectedReflectance_TrueColor&lg=false';+const vectorsQueryString = '?v=-70.43215000968726,28.678203599725197,-59.81569241792232,31.62330063930118&l=GRanD_Dams,Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor'+const TIME_LIMIT = 10000+const someGroupsQueryString = '?l=MODIS_Combined_Value_Added_AOD,MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth,Reference_Labels_15m(hidden),Reference_Features_15m,MODIS_Terra_CorrectedReflectance_TrueColor&lg=true'+const twoGroupsQueryString = '?v=-107.15747724134027,-81.6706340523014,47.81381180183274,89.12472754295932&l=VIIRS_SNPP_Thermal_Anomalies_375m_All,VIIRS_NOAA20_Thermal_Anomalies_375m_All,MODIS_Combined_Value_Added_AOD,MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth,Reference_Features_15m,MODIS_Terra_CorrectedReflectance_TrueColor&lg=true'+const mixedLayersGroupsDisabledQueryString = '?v=-107.15747724134027,-81.6706340523014,47.81381180183274,89.12472754295932&l=Reference_Features_15m,VIIRS_SNPP_Thermal_Anomalies_375m_All,MODIS_Combined_Value_Added_AOD,VIIRS_NOAA20_Thermal_Anomalies_375m_All,MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth,MODIS_Terra_CorrectedReflectance_TrueColor&lg=false'const mixedLayerIdOrder = ['active-Reference_Features_15m','active-VIIRS_SNPP_Thermal_Anomalies_375m_All','active-MODIS_Combined_Value_Added_AOD','active-VIIRS_NOAA20_Thermal_Anomalies_375m_All',- 'active-MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth',-];+ 'active-MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth'+]const groupedLayerIdOrder = ['active-Reference_Features_15m','active-VIIRS_SNPP_Thermal_Anomalies_375m_All','active-VIIRS_NOAA20_Thermal_Anomalies_375m_All','active-MODIS_Combined_Value_Added_AOD',- 'active-MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth',-];+ 'active-MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth'+]const ungroupedReorderdLayerIdOrder = ['active-MODIS_Combined_Value_Added_AOD','active-MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth','active-VIIRS_SNPP_Thermal_Anomalies_375m_All',- 'active-VIIRS_NOAA20_Thermal_Anomalies_375m_All',- 'active-Reference_Features_15m',-];+ 'active-VIIRS_NOAA20_Thermal_Anomalies_375m_All'+]module.exports = {before: (c) => {- loadAndSkipTour(c, TIME_LIMIT);+ loadAndSkipTour(c, TIME_LIMIT)},// Individual layer interactions'Toggle layer Info': (c) => {- c.url(c.globals.url + twoGroupsQueryString);- c.moveToElement(firesLayer, 0, 0);- c.waitForElementVisible(infoButton, TIME_LIMIT);- c.click(infoButton);- c.waitForElementVisible(infoDialog, TIME_LIMIT);- c.click(infoButton).pause(100);- c.expect.element(infoDialog).to.not.be.present;+ c.url(c.globals.url + twoGroupsQueryString)+ c.moveToElement(firesLayer, 0, 0)+ c.waitForElementVisible(infoButton, TIME_LIMIT)+ c.click(infoButton)+ c.waitForElementVisible(infoDialog, TIME_LIMIT)+ c.click(infoButton).pause(100)+ c.expect.element(infoDialog).to.not.be.present},'Toggle Layer Options': (c) => {- c.pause(500);+ c.pause(500)// c.moveToElement(firesLayer, 0, 0);- c.waitForElementVisible(optionsButton, TIME_LIMIT);- c.click(optionsButton);- c.waitForElementVisible(optionsDialog, TIME_LIMIT);- c.click(optionsButton).pause(100);- c.expect.element(optionsDialog).to.not.be.present;+ c.waitForElementVisible(optionsButton, TIME_LIMIT)+ c.click(optionsButton)+ c.waitForElementVisible(optionsDialog, TIME_LIMIT)+ c.click(optionsButton).pause(100)+ c.expect.element(optionsDialog).to.not.be.present},// Layer grouping'Layer groups are enabled by default': (c) => {- c.expect.element(groupCheckbox).to.be.present;- c.assert.attributeContains(groupCheckbox, 'checked', true);+ c.expect.element(groupCheckbox).to.be.present+ c.assert.attributeContains(groupCheckbox, 'checked', true)},'Adding a layer causes it to appear in the appropriate group': (c) => {- c.url(c.globals.url + someGroupsQueryString);- c.click(addLayers);- c.waitForElementVisible(categoriesNav, TIME_LIMIT);- c.setValue(layersSearchField, 'fires').pause(500);- c.waitForElementVisible(layerSearchList, TIME_LIMIT);- c.click(viirsFiresCheckbox).pause(500);- c.click(layersModalCloseButton);- c.expect.element(firesGroup).to.be.present;- c.expect.element(firesLayer).to.be.present;+ c.url(c.globals.url + someGroupsQueryString)+ c.click(addLayers)+ c.waitForElementVisible(categoriesNav, TIME_LIMIT)+ c.setValue(layersSearchField, 'fires').pause(500)+ c.waitForElementVisible(layerSearchList, TIME_LIMIT)+ c.click(viirsFiresCheckbox).pause(500)+ c.click(layersModalCloseButton)+ c.expect.element(firesGroup).to.be.present+ c.expect.element(firesLayer).to.be.present},'Disabling groups puts all overlays into a single group': (c) => {- c.click(groupCheckbox);- c.waitForElementVisible(overlaysGroup, TIME_LIMIT);- c.expect.element(firesLayer).to.be.present;- c.expect.element(firesGroup).to.not.be.present;- c.expect.elements(`${overlaysGroup} ul > li`).count.to.equal(5);+ c.click(groupCheckbox)+ c.waitForElementVisible(overlaysGroup, TIME_LIMIT)+ c.expect.element(firesLayer).to.be.present+ c.expect.element(firesGroup).to.not.be.present+ c.expect.elements(`${overlaysGroup} ul > li`).count.to.equal(5)},'Re-enabling groups restores grouping': (c) => {- c.click(groupCheckbox);- c.waitForElementVisible(firesGroup, TIME_LIMIT);- c.expect.element(aodGroup).to.be.present;- c.expect.elements(`${firesGroup} ul > li`).count.to.equal(1);- c.expect.elements(`${aodGroup} ul > li`).count.to.equal(2);+ c.click(groupCheckbox)+ c.waitForElementVisible(firesGroup, TIME_LIMIT)+ c.expect.element(aodGroup).to.be.present+ c.expect.elements(`${firesGroup} ul > li`).count.to.equal(1)+ c.expect.elements(`${aodGroup} ul > li`).count.to.equal(2)},'Removing the last layer in a group removes the group': (c) => {- c.moveToElement(firesLayer, 0, 0);- c.waitForElementVisible(firesRemove, TIME_LIMIT);- c.click(firesRemove).pause(500);- c.expect.element(firesGroup).to.not.be.present;+ c.moveToElement(firesLayer, 0, 0)+ c.waitForElementVisible(firesRemove, TIME_LIMIT)+ c.click(firesRemove).pause(500)+ c.expect.element(firesGroup).to.not.be.present},'Removing a group removes all layers and the group header': (c) => {- c.url(c.globals.url + twoGroupsQueryString);- c.waitForElementVisible(aodGroup, TIME_LIMIT);- c.moveToElement(aodGroupHeader, 0, 0);- c.waitForElementVisible(`${aodGroup} ${groupOptionsBtn}`);- c.click(`${aodGroup} ${groupOptionsBtn}`).pause(200);- c.click(`${aodGroup} ${groupRemove}`).pause(200);- c.expect.element(aodGroup).to.not.be.present;+ c.url(c.globals.url + twoGroupsQueryString)+ c.waitForElementVisible(aodGroup, TIME_LIMIT)+ c.moveToElement(aodGroupHeader, 0, 0)+ c.waitForElementVisible(`${aodGroup} ${groupOptionsBtn}`)+ c.click(`${aodGroup} ${groupOptionsBtn}`).pause(200)+ c.click(`${aodGroup} ${groupRemove}`).pause(200)+ c.expect.element(aodGroup).to.not.be.present},'Load with groups disabled from permalink': (c) => {- c.url(c.globals.url + mixedLayersGroupsDisabledQueryString);- c.expect.element(groupCheckbox).to.be.present;- c.expect.element(groupCheckbox).to.not.have.attribute('checked');- c.expect.element(firesGroup).to.not.be.present;- c.expect.element(aodGroup).to.not.be.present;- c.expect.element(overlaysGroup).to.be.present;- c.expect.elements(`${overlaysGroup} ul > li`).count.to.equal(5);+ c.url(c.globals.url + mixedLayersGroupsDisabledQueryString)+ c.expect.element(groupCheckbox).to.be.present+ c.expect.element(groupCheckbox).to.not.have.attribute('checked')+ c.expect.element(firesGroup).to.not.be.present+ c.expect.element(aodGroup).to.not.be.present+ c.expect.element(overlaysGroup).to.be.present+ c.expect.elements(`${overlaysGroup} ul > li`).count.to.equal(5)},'Load multiple groups from permalink': (c) => {- c.url(c.globals.url + twoGroupsQueryString);- c.expect.element(groupCheckbox).to.be.present;- c.assert.attributeContains(groupCheckbox, 'checked', true);- c.expect.element(firesGroup).to.be.present;- c.expect.element(aodGroup).to.be.present;- c.expect.elements(`${firesGroup} ul > li`).count.to.equal(2);- c.expect.elements(`${aodGroup} ul > li`).count.to.equal(2);+ c.url(c.globals.url + twoGroupsQueryString)+ c.expect.element(groupCheckbox).to.be.present+ c.assert.attributeContains(groupCheckbox, 'checked', true)+ c.expect.element(firesGroup).to.be.present+ c.expect.element(aodGroup).to.be.present+ c.expect.elements(`${firesGroup} ul > li`).count.to.equal(2)+ c.expect.elements(`${aodGroup} ul > li`).count.to.equal(2)},'Hide all ...': (c) => {- c.moveToElement(sidebarContainer, 0, 0);- c.moveToElement(aodGroupHeader, 0, 0);- c.waitForElementVisible(`${aodGroup} ${groupOptionsBtn}`);- c.click(`${aodGroup} ${groupOptionsBtn}`).pause(200);- c.click(`${aodGroup} ${groupHide}`).pause(200);- c.expect.elements(`${aodGroup} ${layerHidden}`).count.to.equal(2);- c.expect.elements(`${aodGroup} ${layerVisible}`).count.to.equal(0);+ c.moveToElement(sidebarContainer, 0, 0)+ c.moveToElement(aodGroupHeader, 0, 0)+ c.waitForElementVisible(`${aodGroup} ${groupOptionsBtn}`)+ c.click(`${aodGroup} ${groupOptionsBtn}`).pause(200)+ c.click(`${aodGroup} ${groupHide}`).pause(200)+ c.expect.elements(`${aodGroup} ${layerHidden}`).count.to.equal(2)+ c.expect.elements(`${aodGroup} ${layerVisible}`).count.to.equal(0)},'Show all ...': (c) => {- c.moveToElement(sidebarContainer, 0, 0);- c.moveToElement(aodGroupHeader, 0, 0);- c.waitForElementVisible(`${aodGroup} ${groupOptionsBtn}`);- c.click(`${aodGroup} ${groupOptionsBtn}`).pause(200);- c.click(`${aodGroup} ${groupShow}`).pause(200);- c.expect.elements(`${aodGroup} ${layerHidden}`).count.to.equal(0);- c.expect.elements(`${aodGroup} ${layerVisible}`).count.to.equal(2);+ c.moveToElement(sidebarContainer, 0, 0)+ c.moveToElement(aodGroupHeader, 0, 0)+ c.waitForElementVisible(`${aodGroup} ${groupOptionsBtn}`)+ c.click(`${aodGroup} ${groupOptionsBtn}`).pause(200)+ c.click(`${aodGroup} ${groupShow}`).pause(200)+ c.expect.elements(`${aodGroup} ${layerHidden}`).count.to.equal(0)+ c.expect.elements(`${aodGroup} ${layerVisible}`).count.to.equal(2)},'Ungrouped: Removing baselayers/overlays removes the layers but not the header': (c) => {- c.click(groupCheckbox);- c.pause(500);- c.useCss();- c.expect.element('#group-overlays-checkbox-case').to.not.have.attribute('checked');- c.moveToElement(firesLayer, 0, 0);- c.moveToElement(overlaysGroupHeader, 0, 0);- c.waitForElementPresent(`${overlaysGroupHeader} ${groupOptionsBtn}`);- c.click(`${overlaysGroup} ${groupOptionsBtn}`).pause(200);- c.click(`${overlaysGroup} ${groupRemove}`).pause(200);+ c.click(groupCheckbox)+ c.pause(500)+ c.useCss()+ c.expect.element('#group-overlays-checkbox-case').to.not.have.attribute('checked')+ c.moveToElement(firesLayer, 0, 0)+ c.moveToElement(overlaysGroupHeader, 0, 0)+ c.waitForElementPresent(`${overlaysGroupHeader} ${groupOptionsBtn}`)+ c.click(`${overlaysGroup} ${groupOptionsBtn}`).pause(200)+ c.click(`${overlaysGroup} ${groupRemove}`).pause(200)- c.moveToElement(baselayersGroupHeader, 0, 0);- c.waitForElementVisible(`${baselayersGroupHeader} ${groupOptionsBtn}`);- c.click(`${baselayersGroup} ${groupOptionsBtn}`).pause(200);- c.click(`${baselayersGroup} ${groupRemove}`).pause(200);+ c.moveToElement(baselayersGroupHeader, 0, 0)+ c.waitForElementVisible(`${baselayersGroupHeader} ${groupOptionsBtn}`)+ c.click(`${baselayersGroup} ${groupOptionsBtn}`).pause(200)+ c.click(`${baselayersGroup} ${groupRemove}`).pause(200)- c.expect.element(overlaysGroup).to.be.present;- c.expect.elements(`${overlaysGroup} ul > li`).count.to.equal(0);+ c.expect.element(overlaysGroup).to.be.present+ c.expect.elements(`${overlaysGroup} ul > li`).count.to.equal(0)- c.expect.element(baselayersGroup).to.be.present;- c.expect.elements(`${baselayersGroup} ul > li`).count.to.equal(0);+ c.expect.element(baselayersGroup).to.be.present+ c.expect.elements(`${baselayersGroup} ul > li`).count.to.equal(0)},'Re-ordering groups, then disabling groups keeps individual layer order': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.url(c.globals.url + twoGroupsQueryString);- c.waitForElementVisible(aodGroup, TIME_LIMIT);- c.perform(function() {- const actions = this.actions({ async: true });- const layerGroupHeader = c.findElement(aodGroupHeader);- const firesHeader = c.findElement(firesGroupHeader);- c.pause(500);+ c.url(c.globals.url + twoGroupsQueryString)+ c.waitForElementVisible(aodGroup, TIME_LIMIT)+ c.perform(function () {+ const actions = this.actions({ async: true })+ const layerGroupHeader = c.findElement(aodGroupHeader)+ const firesHeader = c.findElement(firesGroupHeader)+ c.pause(500)return actions.click(layerGroupHeader).pause(300)@@ -217,74 +216,74 @@ module.exports = {.move({origin: layerGroupHeader,x: 50,- y: 0,+ y: 0}).pause(300).move({origin: firesHeader,x: 0,- y: 50,+ y: 50}).pause(300).release()- .pause(300);- });- c.click(groupCheckbox);- c.pause(500);- checkElementOrdering(c, `${overlaysGroup} ul > li`, ungroupedReorderdLayerIdOrder);+ .pause(300)+ })+ c.click(groupCheckbox)+ c.pause(500)+ checkElementOrdering(c, `${overlaysGroup} ul > li`, ungroupedReorderdLayerIdOrder)},// begin with "mixed" interspersed layers'Enabling groups re-orders layers into their groups': (c) => {- c.url(c.globals.url + mixedLayersGroupsDisabledQueryString);- c.waitForElementVisible(sidebarContainer, TIME_LIMIT);+ c.url(c.globals.url + mixedLayersGroupsDisabledQueryString)+ c.waitForElementVisible(sidebarContainer, TIME_LIMIT)// confirm mixed layer ordering- checkElementOrdering(c, `${overlaysGroup} ul > li`, mixedLayerIdOrder);- c.click(groupCheckbox).pause(200);- c.expect.element(aodGroup).to.be.present;- c.expect.element(firesGroup).to.be.present;+ checkElementOrdering(c, `${overlaysGroup} ul > li`, mixedLayerIdOrder)+ c.click(groupCheckbox).pause(200)+ c.expect.element(aodGroup).to.be.present+ c.expect.element(firesGroup).to.be.present// confirm layers ordered by their groups- checkElementOrdering(c, groupedOverlaysAllLayers, groupedLayerIdOrder);+ checkElementOrdering(c, groupedOverlaysAllLayers, groupedLayerIdOrder)},'Immediately disabling groups restores mixed ordering': (c) => {- c.click(groupCheckbox).pause(200);- c.expect.element(aodGroup).to.not.be.present;- c.expect.element(firesGroup).to.not.be.present;+ c.click(groupCheckbox).pause(200)+ c.expect.element(aodGroup).to.not.be.present+ c.expect.element(firesGroup).to.not.be.present// confirm pre-group ordering- checkElementOrdering(c, `${overlaysGroup} ul > li`, mixedLayerIdOrder);+ checkElementOrdering(c, `${overlaysGroup} ul > li`, mixedLayerIdOrder)},'Making a change to grouped layers causes group ordering to be retained when ungrouped': (c) => {- c.url(c.globals.url + mixedLayersGroupsDisabledQueryString);+ c.url(c.globals.url + mixedLayersGroupsDisabledQueryString)// Turn on groups- c.click(groupCheckbox).pause(200);+ c.click(groupCheckbox).pause(200)// Modify by setting AOD layers to hidden- c.moveToElement(sidebarContainer, 0, 0);- c.moveToElement(aodGroupHeader, 0, 0);- c.waitForElementVisible(`${aodGroup} ${groupOptionsBtn}`);- c.click(`${aodGroup} ${groupOptionsBtn}`).pause(200);- c.click(`${aodGroup} ${groupHide}`).pause(200);+ c.moveToElement(sidebarContainer, 0, 0)+ c.moveToElement(aodGroupHeader, 0, 0)+ c.waitForElementVisible(`${aodGroup} ${groupOptionsBtn}`)+ c.click(`${aodGroup} ${groupOptionsBtn}`).pause(200)+ c.click(`${aodGroup} ${groupHide}`).pause(200)// Turn off groups- c.click(groupCheckbox).pause(200);+ c.click(groupCheckbox).pause(200)// Confirm ungrouped layer order matches grouped order- checkElementOrdering(c, `${overlaysGroup} ul > li`, groupedLayerIdOrder);+ checkElementOrdering(c, `${overlaysGroup} ul > li`, groupedLayerIdOrder)},// Vector layers'vector layer has pointer icon': (c) => {- c.url(c.globals.url + vectorsQueryString);- c.waitForElementVisible('#active-GRanD_Dams .fa-hand-pointer', TIME_LIMIT);+ c.url(c.globals.url + vectorsQueryString)+ c.waitForElementVisible('#active-GRanD_Dams .fa-hand-pointer', TIME_LIMIT)},'clicking vector layer pointer shows modal': (c) => {- c.click('#active-GRanD_Dams .fa-hand-pointer');+ c.click('#active-GRanD_Dams .fa-hand-pointer')c.waitForElementVisible('.modal-content', TIME_LIMIT, (e) => {c.assert.containsText('.modal-content',- 'Vector features may not be clickable at all zoom levels.');- });+ 'Vector features may not be clickable at all zoom levels.')+ })},// TODO tests for orbit tracks toggle on/offafter: (c) => {- c.end(c);- },-};+ c.end(c)+ }+}diff --git a/e2e/features/layers/layers-vector-test.js b/e2e/features/layers/layers-vector-test.jsindex 25d83f8d9..8725392dd 100644--- a/e2e/features/layers/layers-vector-test.js+++ b/e2e/features/layers/layers-vector-test.js@@ -1,59 +1,59 @@-const skipTour = require('../../reuseables/skip-tour.js');+const skipTour = require('../../reuseables/skip-tour.js')-const damsLayerQuerystring = '?v=-70.43215000968726,28.678203599725197,-59.81569241792232,31.62330063930118&l=GRanD_Dams,Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor';-const damsLayerWMSZoomLevelQuerystring = '?v=-166.0537832499445,-8.893604135881553,79.78417648048394,59.303969410599414&l=GRanD_Dams,Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor';+const damsLayerQuerystring = '?v=-70.43215000968726,28.678203599725197,-59.81569241792232,31.62330063930118&l=GRanD_Dams,Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor'+const damsLayerWMSZoomLevelQuerystring = '?v=-166.0537832499445,-8.893604135881553,79.78417648048394,59.303969410599414&l=GRanD_Dams,Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m,VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor'-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {before: (c) => {- skipTour.loadAndSkipTour(c, TIME_LIMIT);+ skipTour.loadAndSkipTour(c, TIME_LIMIT)},'vector layer has pointer icon': (c) => {- c.url(c.globals.url + damsLayerQuerystring);- c.waitForElementVisible('#active-GRanD_Dams .fa-hand-pointer', TIME_LIMIT);+ c.url(c.globals.url + damsLayerQuerystring)+ c.waitForElementVisible('#active-GRanD_Dams .fa-hand-pointer', TIME_LIMIT)},'vector layer click does not show alert when all vector layers are clickable': (c) => {- const globalSelectors = c.globals.selectors;+ const globalSelectors = c.globals.selectorsc.moveToElement('#wv-map-geographic', 400, 200)- .mouseButtonClick(0);- c.pause(200);- c.expect.element(globalSelectors.notifyMessage).to.not.be.present;+ .mouseButtonClick(0)+ c.pause(200)+ c.expect.element(globalSelectors.notifyMessage).to.not.be.present},'Vectors show alert when not clickable': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- const globalSelectors = c.globals.selectors;+ const globalSelectors = c.globals.selectors- c.url(c.globals.url + damsLayerWMSZoomLevelQuerystring);+ c.url(c.globals.url + damsLayerWMSZoomLevelQuerystring)c.waitForElementVisible('#active-GRanD_Dams .fa-hand-pointer', TIME_LIMIT, () => {c.moveToElement('#wv-map-geographic', 400, 200)- .click('#wv-map-geographic');- c.pause(300);- c.expect.element(globalSelectors.notifyMessage).to.be.present;+ .click('#wv-map-geographic')+ c.pause(300)+ c.expect.element(globalSelectors.notifyMessage).to.be.presentc.assert.containsText(globalSelectors.notifyMessage,- 'Vector features may not be clickable at all zoom levels.',- );- });+ 'Vector features may not be clickable at all zoom levels.'+ )+ })},'clicking vector message shows modal': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- const globalSelectors = c.globals.selectors;+ const globalSelectors = c.globals.selectors- c.click(globalSelectors.notifyMessage);+ c.click(globalSelectors.notifyMessage)c.waitForElementVisible('.modal-content', TIME_LIMIT, () => {c.assert.containsText('.modal-content',- 'Vector features may not be clickable at all zoom levels.');- });+ 'Vector features may not be clickable at all zoom levels.')+ })},// TODO tests for orbit tracks toggle on/offafter: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/layers/options-test.js b/e2e/features/layers/options-test.jsindex 5e6f7a497..e7729581f 100644--- a/e2e/features/layers/options-test.js+++ b/e2e/features/layers/options-test.js@@ -1,61 +1,61 @@-const customsSquashedQuerystring = '?p=geographic&l=VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor,MODIS_Combined_Value_Added_AOD(opacity=0.7,palette=blue_2,min=0.1,0.105,max=0.56,0.565),MODIS_Terra_Aerosol,Reference_Labels_15m(opacity=0.94),Reference_Features_15m(hidden),Coastlines_15m&t=2019-01-15-T00%3A00%3A00Z&z=3&v=-271.7031658620978,-216.84375,370.1093341379022,36.84375';-const TIME_LIMIT = 10000;-const skipTour = require('../../reuseables/skip-tour.js');+const customsSquashedQuerystring = '?p=geographic&l=VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor,MODIS_Combined_Value_Added_AOD(opacity=0.7,palette=blue_2,min=0.1,0.105,max=0.56,0.565),MODIS_Terra_Aerosol,Reference_Labels_15m(opacity=0.94),Reference_Features_15m(hidden),Coastlines_15m&t=2019-01-15-T00%3A00%3A00Z&z=3&v=-271.7031658620978,-216.84375,370.1093341379022,36.84375'+const TIME_LIMIT = 10000+const skipTour = require('../../reuseables/skip-tour.js')-const combinedAodSettingsButton = '#active-MODIS_Combined_Value_Added_AOD .wv-layers-options';-const terraAodSettingsButton = '#active-MODIS_Terra_Aerosol .wv-layers-options';-const terraAodSettingsDialog = '#layer_options_modal-modis_terra_aerosol';-const thresholdMinLabel = '#wv-layer-options-threshold0 .wv-label-range-min';-const activeBluePaletteCheckbox = '.wv-palette-selector-row.checked #wv-palette-radio-blue_2';-const activeDefaultPaletteCheckbox = '.wv-palette-selector-row.checked #wv-palette-radio-__default';-const opacityLabel = '.layer-opacity-select .wv-label';+const combinedAodSettingsButton = '#active-MODIS_Combined_Value_Added_AOD .wv-layers-options'+const terraAodSettingsButton = '#active-MODIS_Terra_Aerosol .wv-layers-options'+const terraAodSettingsDialog = '#layer_options_modal-modis_terra_aerosol'+const thresholdMinLabel = '#wv-layer-options-threshold0 .wv-label-range-min'+const activeBluePaletteCheckbox = '.wv-palette-selector-row.checked #wv-palette-radio-blue_2'+const activeDefaultPaletteCheckbox = '.wv-palette-selector-row.checked #wv-palette-radio-__default'+const opacityLabel = '.layer-opacity-select .wv-label'module.exports = {- before(client) {- skipTour.loadAndSkipTour(client, TIME_LIMIT);+ before (client) {+ skipTour.loadAndSkipTour(client, TIME_LIMIT)},- 'Verify that settings button opens settings modal': function(client) {- client.url(client.globals.url + customsSquashedQuerystring);- client.moveToElement('#active-MODIS_Combined_Value_Added_AOD', 1, 1);+ 'Verify that settings button opens settings modal': function (client) {+ client.url(client.globals.url + customsSquashedQuerystring)+ client.moveToElement('#active-MODIS_Combined_Value_Added_AOD', 1, 1)client.waitForElementVisible(combinedAodSettingsButton,TIME_LIMIT,(e) => {if (client.options.desiredCapabilities.browser !== 'ie') {- client.expect.element(thresholdMinLabel).to.not.be.present;- client.click(combinedAodSettingsButton);- client.waitForElementPresent(thresholdMinLabel, TIME_LIMIT);+ client.expect.element(thresholdMinLabel).to.not.be.present+ client.click(combinedAodSettingsButton)+ client.waitForElementPresent(thresholdMinLabel, TIME_LIMIT)}- },- );+ }+ )},- 'Verify that custom blue custom palette is checked': function(client) {+ 'Verify that custom blue custom palette is checked': function (client) {if (client.options.desiredCapabilities.browser !== 'ie') {- client.expect.element(activeDefaultPaletteCheckbox).to.not.be.present;- client.expect.element(activeBluePaletteCheckbox).to.be.present;+ client.expect.element(activeDefaultPaletteCheckbox).to.not.be.present+ client.expect.element(activeBluePaletteCheckbox).to.be.present}},- 'Verify that threshold and opacity components update when different layer setting button clicked': function(- client,+ 'Verify that threshold and opacity components update when different layer setting button clicked': function (+ client) {if (client.options.desiredCapabilities.browser !== 'ie') {- client.useCss().assert.containsText(thresholdMinLabel, '0.1 – 0.105');- client.useCss().assert.containsText(opacityLabel, '70%');- client.moveToElement('#active-MODIS_Terra_Aerosol', 1, 1).pause(200);- client.click(terraAodSettingsButton);+ client.useCss().assert.containsText(thresholdMinLabel, '0.1 – 0.105')+ client.useCss().assert.containsText(opacityLabel, '70%')+ client.moveToElement('#active-MODIS_Terra_Aerosol', 1, 1).pause(200)+ client.click(terraAodSettingsButton)client.waitForElementPresent(terraAodSettingsDialog,TIME_LIMIT,() => {- client.useCss().assert.containsText(thresholdMinLabel, '< 0.0');- client.useCss().assert.containsText(opacityLabel, '100%');- },- );+ client.useCss().assert.containsText(thresholdMinLabel, '< 0.0')+ client.useCss().assert.containsText(opacityLabel, '100%')+ }+ )}},- 'Verify that default palette is now checked': function(client) {+ 'Verify that default palette is now checked': function (client) {if (client.options.desiredCapabilities.browser !== 'ie') {- client.expect.element(activeBluePaletteCheckbox).to.not.be.present;- client.expect.element(activeDefaultPaletteCheckbox).to.be.present;+ client.expect.element(activeBluePaletteCheckbox).to.not.be.present+ client.expect.element(activeDefaultPaletteCheckbox).to.be.present}- },-};+ }+}diff --git a/e2e/features/layers/recent-layers-mobile-no-local-storage-test.js b/e2e/features/layers/recent-layers-mobile-no-local-storage-test.jsindex 56926b4e9..a0a09a36c 100644--- a/e2e/features/layers/recent-layers-mobile-no-local-storage-test.js+++ b/e2e/features/layers/recent-layers-mobile-no-local-storage-test.js@@ -1,33 +1,33 @@-const { localStorageEnabled } = require('../../reuseables/local-storage-check.js');-const { addLayers, collapsedLayerButton } = require('../../reuseables/selectors.js');+const { localStorageEnabled } = require('../../reuseables/local-storage-check.js')+const { addLayers, collapsedLayerButton } = require('../../reuseables/selectors.js')// Local storage disabledmodule.exports = {'@tags': ['localStorageDisabled'],- before(c) {- c.url(`${c.globals.url}?t=2020-07-04`);- c.setWindowSize(375, 667); // iPhone 6/7/8 dimensions+ before (c) {+ c.url(`${c.globals.url}?t=2020-07-04`)+ c.setWindowSize(375, 667) // iPhone 6/7/8 dimensions},- 'Verify that recent layers dropdown choice does not show when local storage is disabled': function(c) {+ 'Verify that recent layers dropdown choice does not show when local storage is disabled': function (c) {c.execute(localStorageEnabled,[],- function({ value }) {+ function ({ value }) {if (!value) {- c.click(collapsedLayerButton);- c.click(addLayers);+ c.click(collapsedLayerButton)+ c.click(addLayers)c.waitForElementVisible('.categories-dropdown-header', 5000, () => {- c.click('.categories-dropdown-header .dropdown-toggle');- c.expect.elements('.categories-dropdown-item').count.to.equal(3);- c.expect.element('.categories-dropdown-item:nth-of-type(1)').text.not.contains('Recent');- c.expect.element('.categories-dropdown-item:nth-of-type(2)').text.not.contains('Recent');- c.expect.element('.categories-dropdown-item:nth-of-type(3)').text.not.contains('Recent');- });+ c.click('.categories-dropdown-header .dropdown-toggle')+ c.expect.elements('.categories-dropdown-item').count.to.equal(3)+ c.expect.element('.categories-dropdown-item:nth-of-type(1)').text.not.contains('Recent')+ c.expect.element('.categories-dropdown-item:nth-of-type(2)').text.not.contains('Recent')+ c.expect.element('.categories-dropdown-item:nth-of-type(3)').text.not.contains('Recent')+ })}- },- );+ }+ )},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/layers/recent-layers-mobile-test.js b/e2e/features/layers/recent-layers-mobile-test.jsindex 89e5902e4..e2f89b2f0 100644--- a/e2e/features/layers/recent-layers-mobile-test.js+++ b/e2e/features/layers/recent-layers-mobile-test.js@@ -1,52 +1,52 @@-const { assertCategories } = require('../../reuseables/layer-picker.js');-const skipTour = require('../../reuseables/skip-tour.js');+const { assertCategories } = require('../../reuseables/layer-picker.js')+const skipTour = require('../../reuseables/skip-tour.js')const {addLayers,collapsedLayerButton,layersSearchField,layerSearchList,- layerPickerBackButton,-} = require('../../reuseables/selectors.js');+ layerPickerBackButton+} = require('../../reuseables/selectors.js')-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {before: (c) => {- skipTour.loadAndSkipTour(c, TIME_LIMIT);- c.url(`${c.globals.url}?t=2020-07-04`);- c.setWindowSize(375, 667); // iPhone 6/7/8 dimensions+ skipTour.loadAndSkipTour(c, TIME_LIMIT)+ c.url(`${c.globals.url}?t=2020-07-04`)+ c.setWindowSize(375, 667) // iPhone 6/7/8 dimensions},'Layer picker shows categories when first opened': (c) => {- c.waitForElementVisible(collapsedLayerButton, TIME_LIMIT);- c.click(collapsedLayerButton);- c.click(addLayers);- c.waitForElementVisible('.categories-dropdown-header', TIME_LIMIT, assertCategories(c));+ c.waitForElementVisible(collapsedLayerButton, TIME_LIMIT)+ c.click(collapsedLayerButton)+ c.click(addLayers)+ c.waitForElementVisible('.categories-dropdown-header', TIME_LIMIT, assertCategories(c))},'Select several layers': (c) => {- c.setValue(layersSearchField, 'aod');- c.waitForElementVisible(layerSearchList, TIME_LIMIT);- c.click('#MODIS_Aqua_Aerosol-checkbox');- c.click('#MODIS_Combined_Value_Added_AOD-checkbox');- c.click('#OMI_Aerosol_Optical_Depth-checkbox');- c.click(layerPickerBackButton);+ c.setValue(layersSearchField, 'aod')+ c.waitForElementVisible(layerSearchList, TIME_LIMIT)+ c.click('#MODIS_Aqua_Aerosol-checkbox')+ c.click('#MODIS_Combined_Value_Added_AOD-checkbox')+ c.click('#OMI_Aerosol_Optical_Depth-checkbox')+ c.click(layerPickerBackButton)},'Recent tab shows layers that were selected': (c) => {- c.click('.categories-dropdown-header .dropdown-toggle');- c.waitForElementVisible('.categories-dropdown-item:nth-of-type(4)', TIME_LIMIT);- c.click('.categories-dropdown-item:nth-of-type(4)');- c.expect.element('#MODIS_Aqua_Aerosol-search-row').to.be.present;- c.expect.element('#MODIS_Combined_Value_Added_AOD-search-row').to.be.present;- c.expect.element('#OMI_Aerosol_Optical_Depth-search-row').to.be.present;+ c.click('.categories-dropdown-header .dropdown-toggle')+ c.waitForElementVisible('.categories-dropdown-item:nth-of-type(4)', TIME_LIMIT)+ c.click('.categories-dropdown-item:nth-of-type(4)')+ c.expect.element('#MODIS_Aqua_Aerosol-search-row').to.be.present+ c.expect.element('#MODIS_Combined_Value_Added_AOD-search-row').to.be.present+ c.expect.element('#OMI_Aerosol_Optical_Depth-search-row').to.be.present},'Removing individual layers updates the list': (c) => {// Swipe to delete?!},'Clear list button empties the entire list': (c) => {- c.click('#clear-recent-layers');- c.expect.element('.product-outter-list-case.layers-all').to.not.be.present;- c.expect.element('.no-results').to.be.present;+ c.click('#clear-recent-layers')+ c.expect.element('.product-outter-list-case.layers-all').to.not.be.present+ c.expect.element('.no-results').to.be.present},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/layers/recent-layers-no-local-storage-test.js b/e2e/features/layers/recent-layers-no-local-storage-test.jsindex 7362c92d9..6df60af7e 100644--- a/e2e/features/layers/recent-layers-no-local-storage-test.js+++ b/e2e/features/layers/recent-layers-no-local-storage-test.js@@ -1,25 +1,25 @@-const { localStorageEnabled } = require('../../reuseables/local-storage-check.js');-const { addLayers } = require('../../reuseables/selectors.js');+const { localStorageEnabled } = require('../../reuseables/local-storage-check.js')+const { addLayers } = require('../../reuseables/selectors.js')// Local storage disabledmodule.exports = {'@tags': ['localStorageDisabled'],- before(c) {- c.url(`${c.globals.url}?t=2020-07-04`);+ before (c) {+ c.url(`${c.globals.url}?t=2020-07-04`)},- 'Verify that recent layers tab does not show when local storage is disabled': function(c) {+ 'Verify that recent layers tab does not show when local storage is disabled': function (c) {c.execute(localStorageEnabled,[],- function({ value }) {+ function ({ value }) {if (!value) {- c.click(addLayers);- c.expect.element('.recent-tab').to.not.be.present;+ c.click(addLayers)+ c.expect.element('.recent-tab').to.not.be.present}- },- );+ }+ )},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/layers/recent-layers-test.js b/e2e/features/layers/recent-layers-test.jsindex e09cff8f3..fe973662f 100644--- a/e2e/features/layers/recent-layers-test.js+++ b/e2e/features/layers/recent-layers-test.js@@ -1,57 +1,57 @@-const { assertCategories } = require('../../reuseables/layer-picker.js');-const skipTour = require('../../reuseables/skip-tour.js');+const { assertCategories } = require('../../reuseables/layer-picker.js')+const skipTour = require('../../reuseables/skip-tour.js')const {addLayers,categoriesNav,layersSearchField,layerSearchList,- layerPickerBackButton,-} = require('../../reuseables/selectors.js');+ layerPickerBackButton+} = require('../../reuseables/selectors.js')-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {before: (c) => {- skipTour.loadAndSkipTour(c, TIME_LIMIT);- c.url(`${c.globals.url}?t=2020-07-04`);+ skipTour.loadAndSkipTour(c, TIME_LIMIT)+ c.url(`${c.globals.url}?t=2020-07-04`)},'Layer picker shows categories when first opened': (c) => {- c.click(addLayers);- c.waitForElementVisible(categoriesNav, TIME_LIMIT, assertCategories(c));+ c.click(addLayers)+ c.waitForElementVisible(categoriesNav, TIME_LIMIT, assertCategories(c))},'Select several layers': (c) => {- c.setValue(layersSearchField, 'aod');+ c.setValue(layersSearchField, 'aod')c.waitForElementVisible(layerSearchList, TIME_LIMIT, (e) => {- c.click('#MODIS_Aqua_Aerosol-checkbox');- c.click('#MODIS_Combined_Value_Added_AOD-checkbox');- c.click('#OMI_Aerosol_Optical_Depth-checkbox');- c.click(layerPickerBackButton);- });+ c.click('#MODIS_Aqua_Aerosol-checkbox')+ c.click('#MODIS_Combined_Value_Added_AOD-checkbox')+ c.click('#OMI_Aerosol_Optical_Depth-checkbox')+ c.click(layerPickerBackButton)+ })},'Recent tab shows layers that were selected': (c) => {- c.click('.recent-tab');+ c.click('.recent-tab')c.waitForElementVisible('.recent-layers', TIME_LIMIT, (e) => {- c.expect.element('#MODIS_Aqua_Aerosol-search-row').to.be.present;- c.expect.element('#MODIS_Combined_Value_Added_AOD-search-row').to.be.present;- c.expect.element('#OMI_Aerosol_Optical_Depth-search-row').to.be.present;- });+ c.expect.element('#MODIS_Aqua_Aerosol-search-row').to.be.present+ c.expect.element('#MODIS_Combined_Value_Added_AOD-search-row').to.be.present+ c.expect.element('#OMI_Aerosol_Optical_Depth-search-row').to.be.present+ })},'Removing individual layers updates the list': (c) => {- c.moveToElement('#MODIS_Aqua_Aerosol-search-row', 15, 15);+ c.moveToElement('#MODIS_Aqua_Aerosol-search-row', 15, 15)c.waitForElementVisible('.recent-layer-delete', TIME_LIMIT, (e) => {- c.click('.recent-layer-delete');- c.expect.element('#MODIS_Aqua_Aerosol-search-row').to.not.be.present;- c.expect.element('#MODIS_Combined_Value_Added_AOD-search-row').to.be.present;- c.expect.element('#OMI_Aerosol_Optical_Depth-search-row').to.be.present;- });+ c.click('.recent-layer-delete')+ c.expect.element('#MODIS_Aqua_Aerosol-search-row').to.not.be.present+ c.expect.element('#MODIS_Combined_Value_Added_AOD-search-row').to.be.present+ c.expect.element('#OMI_Aerosol_Optical_Depth-search-row').to.be.present+ })},'Clear list button empties the entire list': (c) => {- c.click('#clear-recent-layers');- c.expect.element('.product-outter-list-case.layers-all').to.not.be.present;- c.expect.element('.no-results').to.be.present;+ c.click('#clear-recent-layers')+ c.expect.element('.product-outter-list-case.layers-all').to.not.be.present+ c.expect.element('.no-results').to.be.present},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/local-storage/disabled-local-storage-test.js b/e2e/features/local-storage/disabled-local-storage-test.jsindex ecfb9e54a..46ad7f592 100644--- a/e2e/features/local-storage/disabled-local-storage-test.js+++ b/e2e/features/local-storage/disabled-local-storage-test.js@@ -1,27 +1,27 @@-const { normalizeViewport } = require('../../reuseables/normalize-viewport.js');-const { localStorageEnabled } = require('../../reuseables/local-storage-check.js');+const { normalizeViewport } = require('../../reuseables/normalize-viewport.js')+const { localStorageEnabled } = require('../../reuseables/local-storage-check.js')module.exports = {'@tags': ['localStorageDisabled', 'skipLocalStorageEnabled'],- before(c) {- normalizeViewport(c, 1000, 850);- c.url(c.globals.url);+ before (c) {+ normalizeViewport(c, 1000, 850)+ c.url(c.globals.url)},- 'Verify tour modal does not display when local storage disabled': function(c) {+ 'Verify tour modal does not display when local storage disabled': function (c) {c.execute(localStorageEnabled,[],- function(result) {+ function (result) {if (result.value) {- throw new Error('Local storage enabled for test that expected disabled.');+ throw new Error('Local storage enabled for test that expected disabled.')}// eslint-disable-next-line no-console- console.log('Local storage disabled');- c.assert.not.elementPresent('.tour-start');- },- );+ console.log('Local storage disabled')+ c.assert.not.elementPresent('.tour-start')+ }+ )},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/location-search/location-search-mobile-test.js b/e2e/features/location-search/location-search-mobile-test.jsindex 267a27bd5..08f95a6b6 100644--- a/e2e/features/location-search/location-search-mobile-test.js+++ b/e2e/features/location-search/location-search-mobile-test.js@@ -1,30 +1,30 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000const {locationSearchToolbarButton,- locationSearchMobileDialog,-} = localSelectors;+ locationSearchMobileDialog+} = localSelectorsmodule.exports = {- before(c) {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.setWindowSize(375, 667); // iPhone 6/7/8 dimensions- c.pause(300);+ before (c) {+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.setWindowSize(375, 667) // iPhone 6/7/8 dimensions+ c.pause(300)},'Location Search mobile dialog is not visible by default': (c) => {- c.waitForElementVisible(locationSearchToolbarButton, TIME_LIMIT);- c.expect.element(locationSearchMobileDialog).to.not.be.present;+ c.waitForElementVisible(locationSearchToolbarButton, TIME_LIMIT)+ c.expect.element(locationSearchMobileDialog).to.not.be.present},'Clicking Location Search toolbar button opens the Location Search mobile dialog': (c) => {- c.waitForElementVisible(locationSearchToolbarButton, TIME_LIMIT);- c.click(locationSearchToolbarButton);- c.pause(500);- c.expect.element(locationSearchMobileDialog).to.be.present;+ c.waitForElementVisible(locationSearchToolbarButton, TIME_LIMIT)+ c.click(locationSearchToolbarButton)+ c.pause(500)+ c.expect.element(locationSearchMobileDialog).to.be.present},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/location-search/location-search-test.js b/e2e/features/location-search/location-search-test.jsindex 39a6d8758..3df5cef03 100644--- a/e2e/features/location-search/location-search-test.js+++ b/e2e/features/location-search/location-search-test.js@@ -1,9 +1,9 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')// encoded id; originally coordinates-map-marker_38.8904,-77.032-const testMarkerEncodedID = '.coordinates-map-marker_-77__2E__032__2C__38__2E__8904';-const TIME_LIMIT = 10000;+const testMarkerEncodedID = '.coordinates-map-marker_-77__2E__032__2C__38__2E__8904'+const TIME_LIMIT = 10000const {locationSearchToolbarButton,@@ -14,61 +14,61 @@ const {tooltipCoordinates,tooltipCoordinatesMinimizeButton,tooltipCoordinatesCloseButton,- coordinatesMapMarker,-} = localSelectors;+ coordinatesMapMarker+} = localSelectorsmodule.exports = {- before(c) {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ before (c) {+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},'Location Search component is visible by default': (c) => {- c.waitForElementVisible(locationSearchComponent, TIME_LIMIT);- c.expect.element(locationSearchComponent).to.be.present;+ c.waitForElementVisible(locationSearchComponent, TIME_LIMIT)+ c.expect.element(locationSearchComponent).to.be.present},'Clicking the minimize button minimizes the Location Search component': (c) => {- c.waitForElementVisible(locationSearchComponent, TIME_LIMIT);- c.click(locationSearchMinimizeButton);- c.pause(500);- c.expect.element(locationSearchComponent).to.not.be.present;+ c.waitForElementVisible(locationSearchComponent, TIME_LIMIT)+ c.click(locationSearchMinimizeButton)+ c.pause(500)+ c.expect.element(locationSearchComponent).to.not.be.present},'Location Search component remains hidden on subsequent page loads per user preference': (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.waitForElementVisible(locationSearchToolbarButton, TIME_LIMIT);- c.expect.element(locationSearchComponent).to.not.be.present;+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.waitForElementVisible(locationSearchToolbarButton, TIME_LIMIT)+ c.expect.element(locationSearchComponent).to.not.be.present},'Clicking Location Search toolbar button expands the Location Search component': (c) => {- c.click(locationSearchToolbarButton);- c.pause(500);- c.expect.element(locationSearchComponent).to.be.present;+ c.click(locationSearchToolbarButton)+ c.pause(500)+ c.expect.element(locationSearchComponent).to.be.present},'Coordinates dialog for permalink marker is visible by default on page load': (c) => {- c.url(`${c.globals.url}?v=-176.3167432493038,-16.70650759975561,-16.988618249303812,108.30938074294103&s=-77.032,38.8904`);- c.waitForElementVisible(tooltipCoordinatesContainer, TIME_LIMIT);- c.expect.element(testMarkerEncodedID).to.be.present;+ c.url(`${c.globals.url}?v=-176.3167432493038,-16.70650759975561,-16.988618249303812,108.30938074294103&s=-77.032,38.8904`)+ c.waitForElementVisible(tooltipCoordinatesContainer, TIME_LIMIT)+ c.expect.element(testMarkerEncodedID).to.be.present},'Coordinates title and detailed coordinates are correct': (c) => {- c.assert.containsText(tooltipCoordinatesTitle, 'Washington, District of Columbia');- c.assert.containsText(tooltipCoordinates, '38.8904°, -77.0320°');+ c.assert.containsText(tooltipCoordinatesTitle, 'Washington, District of Columbia')+ c.assert.containsText(tooltipCoordinates, '38.8904°, -77.0320°')},'Clicking minimize tooltip hides the coordinates dialog': (c) => {- c.click(tooltipCoordinatesMinimizeButton);- c.pause(500);- c.expect.element(tooltipCoordinatesContainer).to.not.be.present;+ c.click(tooltipCoordinatesMinimizeButton)+ c.pause(500)+ c.expect.element(tooltipCoordinatesContainer).to.not.be.present},'Clicking close tooltip removes the marker and coordinates dialog': (c) => {- c.url(`${c.globals.url}?v=-39.980778604772254,-93.78047406661956,48.73858468999798,-50.229432449264905&s=10,-75`);- c.waitForElementVisible(tooltipCoordinatesContainer, TIME_LIMIT);- c.click(tooltipCoordinatesCloseButton);- c.pause(500);- c.expect.element(coordinatesMapMarker).to.not.be.present;- c.assert.not.urlContains('s=');+ c.url(`${c.globals.url}?v=-39.980778604772254,-93.78047406661956,48.73858468999798,-50.229432449264905&s=10,-75`)+ c.waitForElementVisible(tooltipCoordinatesContainer, TIME_LIMIT)+ c.click(tooltipCoordinatesCloseButton)+ c.pause(500)+ c.expect.element(coordinatesMapMarker).to.not.be.present+ c.assert.not.urlContains('s=')},'Invalid marker query string parameter prevents state update': (c) => {- c.url(`${c.globals.url}?s=-51.5,invalidtext`);- c.expect.element(coordinatesMapMarker).to.not.be.present;- c.assert.not.urlContains('s=');+ c.url(`${c.globals.url}?s=-51.5,invalidtext`)+ c.expect.element(coordinatesMapMarker).to.not.be.present+ c.assert.not.urlContains('s=')},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/measure/measure-test.js b/e2e/features/measure/measure-test.jsindex a31ff0fc7..82092faf3 100644--- a/e2e/features/measure/measure-test.js+++ b/e2e/features/measure/measure-test.js@@ -1,8 +1,8 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');-const { switchProjection } = require('../../reuseables/switch-projection');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')+const { switchProjection } = require('../../reuseables/switch-projection')-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000const {measureBtn,@@ -15,198 +15,198 @@ const {arcticMeasurementTooltip,sidebarContainer,unitOfMeasureToggle,- downloadGeojsonBtn,+ downloadGeojsonBtn// downloadShapefileBtn,-} = localSelectors;+} = localSelectors-function createDistanceMeasurement(c, [startX, startY], [endX, endY]) {- c.useCss().click(measureBtn);- c.waitForElementVisible(measureMenu);- c.useCss().click(measureDistanceBtn);- c.pause(200);- c.waitForElementVisible('#measurement-alert', TIME_LIMIT);- c.perform(function() {- const actions = this.actions({ async: true });+function createDistanceMeasurement (c, [startX, startY], [endX, endY]) {+ c.useCss().click(measureBtn)+ c.waitForElementVisible(measureMenu)+ c.useCss().click(measureDistanceBtn)+ c.pause(200)+ c.waitForElementVisible('#measurement-alert', TIME_LIMIT)+ c.perform(function () {+ const actions = this.actions({ async: true })return actions.move({origin: 'viewport',x: startX,- y: startY,+ y: startY}).click().move({origin: 'pointer',x: endX,- y: endY,+ y: endY})- .doubleClick();- });+ .doubleClick()+ })}module.exports = {- before(c) {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.setWindowSize(1700, 1000);+ before (c) {+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.setWindowSize(1700, 1000)},'Clicking the measure button opens the menu': (c) => {- c.expect.element(measureMenu).to.not.be.present;- c.useCss().click(measureBtn);- c.waitForElementVisible(measureMenu, TIME_LIMIT);- c.pause(300);+ c.expect.element(measureMenu).to.not.be.present+ c.useCss().click(measureBtn)+ c.waitForElementVisible(measureMenu, TIME_LIMIT)+ c.pause(300)},'Initiating a measurement causes an alert to show and sidebar to collapse': (c) => {- c.useCss().click(measureDistanceBtn);- c.waitForElementVisible('#measurement-alert', TIME_LIMIT);- c.useCss().assert.elementPresent(sidebarContainer);+ c.useCss().click(measureDistanceBtn)+ c.waitForElementVisible('#measurement-alert', TIME_LIMIT)+ c.useCss().assert.elementPresent(sidebarContainer)c.useCss().assert.cssProperty(sidebarContainer,'max-height',- '0px',- );- c.pause(300);+ '0px'+ )+ c.pause(300)},'Cancelling a measurement causes an alert to disappear and sidebar to expand': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') { // right click doesn't work in firefox- return;+ return}- c.perform(function() {- const actions = this.actions({ async: true });+ c.perform(function () {+ const actions = this.actions({ async: true })return actions.move({origin: 'viewport',x: 200,- y: 110,+ y: 110})- .contextClick();- });- c.pause(300);- c.expect.element('#measurement-alert').to.not.be.present;+ .contextClick()+ })+ c.pause(300)+ c.expect.element('#measurement-alert').to.not.be.presentc.expect.element(sidebarContainer)- .to.have.css('max-height').which.does.not.equal('0px');+ .to.have.css('max-height').which.does.not.equal('0px')},'Creating a distance measurement causes a tooltip to show': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- createDistanceMeasurement(c, [400, 200], [450, 300]);- createDistanceMeasurement(c, [350, 250], [350, 220]);- c.waitForElementVisible(geoMeasurementTooltip, TIME_LIMIT);- c.pause(500);- c.expect.elements(geoMeasurementTooltip).count.to.equal(2);+ createDistanceMeasurement(c, [400, 200], [450, 300])+ createDistanceMeasurement(c, [350, 250], [350, 220])+ c.waitForElementVisible(geoMeasurementTooltip, TIME_LIMIT)+ c.pause(500)+ c.expect.elements(geoMeasurementTooltip).count.to.equal(2)},'Creating a area measurement causes a tooltip to show': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.useCss().click(measureBtn);- c.pause(500);+ c.useCss().click(measureBtn)+ c.pause(500)c.waitForElementVisible(measureMenu, TIME_LIMIT, (el) => {- c.useCss().click(measureAreaBtn);- c.perform(function() {- const actions = this.actions({ async: true });+ c.useCss().click(measureAreaBtn)+ c.perform(function () {+ const actions = this.actions({ async: true })return actions.move({origin: 'viewport',x: 375,- y: 225,+ y: 225}).click().move({origin: 'pointer',x: 400,- y: 275,+ y: 275}).click().move({x: 450,- y: 300,+ y: 300})- .doubleClick();- });- c.waitForElementVisible(geoMeasurementTooltip, TIME_LIMIT);- c.expect.elements(geoMeasurementTooltip).count.to.equal(3);- });+ .doubleClick()+ })+ c.waitForElementVisible(geoMeasurementTooltip, TIME_LIMIT)+ c.expect.elements(geoMeasurementTooltip).count.to.equal(3)+ })},'Download as GeoJSON and Shapefile options available in menu': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.click(measureBtn);- c.pause(500);- c.waitForElementVisible(downloadGeojsonBtn);+ c.click(measureBtn)+ c.pause(500)+ c.waitForElementVisible(downloadGeojsonBtn)// c.waitForElementVisible(downloadShapefileBtn);- c.click('.modal');+ c.click('.modal')},'Switching to arctic projection, no measurements show': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- switchProjection(c, 'arctic');- c.expect.elements(arcticMeasurementTooltip).count.to.equal(0);+ switchProjection(c, 'arctic')+ c.expect.elements(arcticMeasurementTooltip).count.to.equal(0)},'Download as GeoJSON and Shapefile options NOT available in menu': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.click(measureBtn);- c.expect.element(downloadGeojsonBtn).to.not.be.present;+ c.click(measureBtn)+ c.expect.element(downloadGeojsonBtn).to.not.be.present// c.expect.element(downloadShapefileBtn).to.not.be.present;- c.click('.modal');+ c.click('.modal')},'Creating measurements in arctic projection causes tooltips to show': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- createDistanceMeasurement(c, [500, 200], [650, 300]);- createDistanceMeasurement(c, [450, 350], [550, 220]);- c.waitForElementVisible(arcticMeasurementTooltip, TIME_LIMIT);- c.expect.elements(arcticMeasurementTooltip).count.to.equal(2);+ createDistanceMeasurement(c, [500, 200], [650, 300])+ createDistanceMeasurement(c, [450, 350], [550, 220])+ c.waitForElementVisible(arcticMeasurementTooltip, TIME_LIMIT)+ c.expect.elements(arcticMeasurementTooltip).count.to.equal(2)},'Clearing a measurements removes all tooltips in this projection only': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') { // c.elements() returns different values for firefox- return;+ return}- c.useCss().click(measureBtn);+ c.useCss().click(measureBtn)c.waitForElementVisible(measureMenu, TIME_LIMIT, (el) => {- c.useCss().click(clearMeasurementsBtn);- c.expect.elements(arcticMeasurementTooltip).count.to.equal(0);- c.expect.elements(geoMeasurementTooltip).count.to.equal(3);- });+ c.useCss().click(clearMeasurementsBtn)+ c.expect.elements(arcticMeasurementTooltip).count.to.equal(0)+ c.expect.elements(geoMeasurementTooltip).count.to.equal(3)+ })},'Switching back to geographic projection, three measurements show again': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') { // c.elements() returns different values for firefox- return;+ return}- switchProjection(c, 'geographic');- c.expect.elements(geoMeasurementTooltip).count.to.equal(3);+ switchProjection(c, 'geographic')+ c.expect.elements(geoMeasurementTooltip).count.to.equal(3)},- 'Toggling unit of measure updates the measurement value': async(c) => {+ 'Toggling unit of measure updates the measurement value': async (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') { // c.elements() returns different values for firefox- return;+ return}- c.click(measureBtn);- await c.waitForElementVisible(measureMenu, TIME_LIMIT);- await c.click(unitOfMeasureToggle);- c.pause(500);- const tooltips = await c.elements('css selector', measurementTooltip);+ c.click(measureBtn)+ await c.waitForElementVisible(measureMenu, TIME_LIMIT)+ await c.click(unitOfMeasureToggle)+ c.pause(500)+ const tooltips = await c.elements('css selector', measurementTooltip)tooltips.forEach((element) => {c.elementIdText(element.ELEMENT, (elResult) => {- const pass = elResult.value.includes('mi');- c.assert.ok(pass);- });- });+ const pass = elResult.value.includes('mi')+ c.assert.ok(pass)+ })+ })},'Clearing a measurements removes all tooltips': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') { // c.elements() returns different values for firefox- return;+ return}- c.waitForElementVisible(measureMenu);- c.useCss().click(clearMeasurementsBtn);- c.expect.elements(measurementTooltip).count.to.equal(0);+ c.waitForElementVisible(measureMenu)+ c.useCss().click(clearMeasurementsBtn)+ c.expect.elements(measurementTooltip).count.to.equal(0)},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/modal/about-modal.js b/e2e/features/modal/about-modal.jsindex 4aa4f76df..e0b916c4b 100644--- a/e2e/features/modal/about-modal.js+++ b/e2e/features/modal/about-modal.js@@ -1,40 +1,40 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')const {- infoToolbarButton,-} = localSelectors;+ infoToolbarButton+} = localSelectors-const aboutOpenURL = 'http://localhost:3000/?abt=on';-const aboutClosedURL = 'http://localhost:3000/';+const aboutOpenURL = 'http://localhost:3000/?abt=on'+const aboutClosedURL = 'http://localhost:3000/'-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {beforeEach: (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},'About modal not open when URL param not present': (c) => {- c.url(aboutClosedURL);- c.expect.element('.about-page').to.be.not.present;+ c.url(aboutClosedURL)+ c.expect.element('.about-page').to.be.not.present},'Opening about modal from menu sets URL param': (c) => {- c.click(infoToolbarButton);- c.waitForElementVisible('#about_info_item', TIME_LIMIT);- c.click('#about_info_item');- c.waitForElementVisible('.about-page', TIME_LIMIT);- c.expect.element('.about-page').to.be.present;- c.assert.urlParameterEquals('abt', 'on');+ c.click(infoToolbarButton)+ c.waitForElementVisible('#about_info_item', TIME_LIMIT)+ c.click('#about_info_item')+ c.waitForElementVisible('.about-page', TIME_LIMIT)+ c.expect.element('.about-page').to.be.present+ c.assert.urlParameterEquals('abt', 'on')},'About modal is open when URL param is present': (c) => {- c.url(aboutOpenURL);- c.expect.element('.about-page').to.be.present;+ c.url(aboutOpenURL)+ c.expect.element('.about-page').to.be.present},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/notifications/notify-test.js b/e2e/features/notifications/notify-test.jsindex f344bfc07..aa2d2b176 100644--- a/e2e/features/notifications/notify-test.js+++ b/e2e/features/notifications/notify-test.js@@ -1,117 +1,116 @@-const TIME_LIMIT = 30000;-const mockParam = '?mockAlerts=';-const layerNoticesTestParams = '?l=Coastlines_15m,MODIS_Aqua_CorrectedReflectance_TrueColor,Particulate_Matter_Below_2.5micrometers_2001-2010';-const localSelectors = require('../../reuseables/selectors.js');+const TIME_LIMIT = 30000+const mockParam = '?mockAlerts='+const layerNoticesTestParams = '?l=Coastlines_15m,MODIS_Aqua_CorrectedReflectance_TrueColor,Particulate_Matter_Below_2.5micrometers_2001-2010'+const localSelectors = require('../../reuseables/selectors.js')const {addLayers,layersSearchField,categoriesNav,- infoToolbarButton,-} = localSelectors;+ infoToolbarButton+} = localSelectors// Selectors-const infoButtonIcon = `${infoToolbarButton} svg.svg-inline--fa`;-const infoMenu = '#toolbar_info';-const giftListItem = '#toolbar_info li.gift';-const boltListItem = '#toolbar_info li.bolt';-const notificationsListItem = '#notifications_info_item .fa-exclamation-circle';-const alertContentHighlighted = '#notification_list_modal .alert-notification-item';-const outageContentHighlighted = '#notification_list_modal .outage-notification-item';-const messageContentHighlighted = '#notification_list_modal .message-notification-item';-const aquaNotice = 'The Aqua / MODIS Corrected Reflectance (True Color) layer is currently unavailable.';-const multiNotice = 'Several layers are experiencing delays in processing.';-const tooltipSelector = '.tooltip-inner div';-const aquaZot = '#MODIS_Aqua_CorrectedReflectance_TrueColor-zot';-const particulateZot = '#Particulate_Matter_Below_2__2E__5micrometers_2001-2010-zot';+const infoButtonIcon = `${infoToolbarButton} svg.svg-inline--fa`+const infoMenu = '#toolbar_info'+const giftListItem = '#toolbar_info li.gift'+const boltListItem = '#toolbar_info li.bolt'+const notificationsListItem = '#notifications_info_item .fa-exclamation-circle'+const alertContentHighlighted = '#notification_list_modal .alert-notification-item'+const outageContentHighlighted = '#notification_list_modal .outage-notification-item'+const messageContentHighlighted = '#notification_list_modal .message-notification-item'+const aquaNotice = 'The Aqua / MODIS Corrected Reflectance (True Color) layer is currently unavailable.'+const multiNotice = 'Several layers are experiencing delays in processing.'+const tooltipSelector = '.tooltip-inner div'+const aquaZot = '#MODIS_Aqua_CorrectedReflectance_TrueColor-zot'+const particulateZot = '#Particulate_Matter_Below_2__2E__5micrometers_2001-2010-zot'module.exports = {- 'No visible notifications with mockAlert parameter set to no_types': function(c) {- c.url(`${c.globals.url + mockParam}no_types`);- c.waitForElementVisible(infoButtonIcon, TIME_LIMIT);- c.click(infoButtonIcon);- c.pause(2000);- c.expect.element(infoMenu).text.not.contains('Notifications');- c.expect.element(giftListItem).to.not.be.present;- c.expect.element(boltListItem).to.not.be.present;+ 'No visible notifications with mockAlert parameter set to no_types': function (c) {+ c.url(`${c.globals.url + mockParam}no_types`)+ c.waitForElementVisible(infoButtonIcon, TIME_LIMIT)+ c.click(infoButtonIcon)+ c.pause(2000)+ c.expect.element(infoMenu).text.not.contains('Notifications')+ c.expect.element(giftListItem).to.not.be.present+ c.expect.element(boltListItem).to.not.be.present},- 'Outage takes precedence when all three notifications are present': function(c) {- c.url(`${c.globals.url + layerNoticesTestParams}&mockAlerts=all_types`);- c.waitForElementVisible(infoButtonIcon, TIME_LIMIT);- c.expect.element(`${infoToolbarButton}.wv-status-outage`).to.be.present;- c.click(infoButtonIcon);- c.pause(2000);- c.assert.containsText(infoMenu, 'Notifications');- c.expect.element(notificationsListItem).to.be.present;+ 'Outage takes precedence when all three notifications are present': function (c) {+ c.url(`${c.globals.url + layerNoticesTestParams}&mockAlerts=all_types`)+ c.waitForElementVisible(infoButtonIcon, TIME_LIMIT)+ c.expect.element(`${infoToolbarButton}.wv-status-outage`).to.be.present+ c.click(infoButtonIcon)+ c.pause(2000)+ c.assert.containsText(infoMenu, 'Notifications')+ c.expect.element(notificationsListItem).to.be.present},- 'Verify that layer notices don\'t show up in the notification list or contribute to the count': function(c) {- c.waitForElementVisible('#notifications_info_item', TIME_LIMIT);- c.expect.element('span.badge').to.be.present;- c.assert.containsText('span.badge', '3');+ 'Verify that layer notices don\'t show up in the notification list or contribute to the count': function (c) {+ c.waitForElementVisible('#notifications_info_item', TIME_LIMIT)+ c.expect.element('span.badge').to.be.present+ c.assert.containsText('span.badge', '3')},- 'alert, outage, and message content is highlighted and found in modal': function(c) {- c.click(notificationsListItem);- c.waitForElementVisible(outageContentHighlighted, TIME_LIMIT);+ 'alert, outage, and message content is highlighted and found in modal': function (c) {+ c.click(notificationsListItem)+ c.waitForElementVisible(outageContentHighlighted, TIME_LIMIT)c.assert.containsText(`${outageContentHighlighted} span`,- 'Posted 20 May 2018',- );+ 'Posted 20 May 2018'+ )c.assert.containsText(`${alertContentHighlighted} p`,- 'learn how to visualize global satellite imagery',- );+ 'learn how to visualize global satellite imagery'+ )c.assert.containsText(`${messageContentHighlighted} p`,- 'This is a message test',- );+ 'This is a message test'+ )},- 'Verify that the user is only alerted if they have not already stored all items in localStorage': function(c) {+ 'Verify that the user is only alerted if they have not already stored all items in localStorage': function (c) {c.click('#notification_list_modal .close')- .pause(500);- c.waitForElementVisible(infoButtonIcon, TIME_LIMIT);- c.expect.element(`${infoToolbarButton}.wv-status-hide`).to.be.present;+ .pause(500)+ c.waitForElementVisible(infoButtonIcon, TIME_LIMIT)+ c.expect.element(`${infoToolbarButton}.wv-status-hide`).to.be.present},// Layer notice tests- 'Verify that zots show for the layers that have notices': function(c) {- c.waitForElementVisible(infoButtonIcon, TIME_LIMIT);- c.expect.element(aquaZot).to.be.present;- c.moveToElement(aquaZot, 2, 2);- c.waitForElementVisible(tooltipSelector, TIME_LIMIT);- c.assert.containsText(`${tooltipSelector} div:first-of-type`, aquaNotice);- c.assert.containsText(`${tooltipSelector} div:last-of-type`, multiNotice);+ 'Verify that zots show for the layers that have notices': function (c) {+ c.waitForElementVisible(infoButtonIcon, TIME_LIMIT)+ c.expect.element(aquaZot).to.be.present+ c.moveToElement(aquaZot, 2, 2)+ c.waitForElementVisible(tooltipSelector, TIME_LIMIT)+ c.assert.containsText(`${tooltipSelector} div:first-of-type`, aquaNotice)+ c.assert.containsText(`${tooltipSelector} div:last-of-type`, multiNotice)- c.expect.element(particulateZot).to.be.present;- c.moveToElement(particulateZot, 2, 2);- c.waitForElementVisible(tooltipSelector, TIME_LIMIT);- c.assert.containsText(`${tooltipSelector} div`, multiNotice);+ c.expect.element(particulateZot).to.be.present+ c.moveToElement(particulateZot, 2, 2)+ c.waitForElementVisible(tooltipSelector, TIME_LIMIT)+ c.assert.containsText(`${tooltipSelector} div`, multiNotice)},- 'Verify that warning shows in the product picker category/measurement rows': function(c) {- c.click(addLayers);- c.waitForElementVisible(categoriesNav, TIME_LIMIT);- c.pause(500);- c.click('#layer-category-item-air-quality-corrected-reflectance');- c.moveToElement('#checkbox-case-MODIS_Aqua_CorrectedReflectance_TrueColor', 2, 2);- c.waitForElementVisible(tooltipSelector, TIME_LIMIT);- c.assert.containsText(`${tooltipSelector} div:first-of-type`, aquaNotice);- c.assert.containsText(`${tooltipSelector} div:last-of-type`, multiNotice);+ 'Verify that warning shows in the product picker category/measurement rows': function (c) {+ c.click(addLayers)+ c.waitForElementVisible(categoriesNav, TIME_LIMIT)+ c.pause(500)+ c.click('#layer-category-item-air-quality-corrected-reflectance')+ c.moveToElement('#checkbox-case-MODIS_Aqua_CorrectedReflectance_TrueColor', 2, 2)+ c.waitForElementVisible(tooltipSelector, TIME_LIMIT)+ c.assert.containsText(`${tooltipSelector} div:first-of-type`, aquaNotice)+ c.assert.containsText(`${tooltipSelector} div:last-of-type`, multiNotice)},- 'Verify that warning shows in the product picker search results rows': function(c) {+ 'Verify that warning shows in the product picker search results rows': function (c) {if (c.options.desiredCapabilities.browserName === 'firefox') {// For some reason moveToElement seems to inconsistently work in Firefox- return;+ return}- c.setValue(layersSearchField, 'MODIS_Aqua_CorrectedReflectance_TrueColor');- c.waitForElementVisible('#MODIS_Aqua_CorrectedReflectance_TrueColor-notice-info', TIME_LIMIT);- c.pause(300);- c.moveToElement('css selector', '.layer-notice-icon', 0, 0);- c.pause(500);- c.waitForElementVisible(tooltipSelector, TIME_LIMIT);- c.assert.containsText(`${tooltipSelector} div:first-of-type`, aquaNotice);- c.assert.containsText(`${tooltipSelector} div:last-of-type`, multiNotice);+ c.setValue(layersSearchField, 'MODIS_Aqua_CorrectedReflectance_TrueColor')+ c.waitForElementVisible('#MODIS_Aqua_CorrectedReflectance_TrueColor-notice-info', TIME_LIMIT)+ c.pause(300)+ c.moveToElement('css selector', '.layer-notice-icon', 0, 0)+ c.pause(500)+ c.waitForElementVisible(tooltipSelector, TIME_LIMIT)+ c.assert.containsText(`${tooltipSelector} div:first-of-type`, aquaNotice)+ c.assert.containsText(`${tooltipSelector} div:last-of-type`, multiNotice)},- after(c) {- c.end();- },-};-+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/palettes/disable-test.js b/e2e/features/palettes/disable-test.jsindex 22470e4a7..3de1cac86 100644--- a/e2e/features/palettes/disable-test.js+++ b/e2e/features/palettes/disable-test.js@@ -1,54 +1,54 @@-const { normalizeViewport } = require('../../reuseables/normalize-viewport.js');+const { normalizeViewport } = require('../../reuseables/normalize-viewport.js')-const TIME_LIMIT = 10000;-const enabledPermalink = '?l=Last_of_the_Wild_1995-2004';-const disabledPermalink = '?l=Last_of_the_Wild_1995-2004(disabled=0-13-12-1-2-6)';-const classColorBoxId = '#Last_of_the_Wild_1995-2004_0_legend-color-Last_of_the_Wild_1995-2004-active';+const TIME_LIMIT = 10000+const enabledPermalink = '?l=Last_of_the_Wild_1995-2004'+const disabledPermalink = '?l=Last_of_the_Wild_1995-2004(disabled=0-13-12-1-2-6)'+const classColorBoxId = '#Last_of_the_Wild_1995-2004_0_legend-color-Last_of_the_Wild_1995-2004-active'module.exports = {- before(client) {- normalizeViewport(client, 1000, 850);- client.url(client.globals.url + enabledPermalink);+ before (client) {+ normalizeViewport(client, 1000, 850)+ client.url(client.globals.url + enabledPermalink)},'Verify that toggling class updates permalink and layer-legend': (client) => {client.waitForElementVisible('#active-Last_of_the_Wild_1995-2004', TIME_LIMIT, () => {- client.expect.element('#active-Last_of_the_Wild_1995-2004 .disabled-classification').to.not.be.present;- client.moveToElement('#active-Last_of_the_Wild_1995-2004', 1, 1).pause(200);- client.click('#active-Last_of_the_Wild_1995-2004 .wv-layers-options');+ client.expect.element('#active-Last_of_the_Wild_1995-2004 .disabled-classification').to.not.be.present+ client.moveToElement('#active-Last_of_the_Wild_1995-2004', 1, 1).pause(200)+ client.click('#active-Last_of_the_Wild_1995-2004 .wv-layers-options')client.waitForElementVisible('.layer-classification-toggle', 2000, () => {- client.click('.classification-list .react-switch-case .react-switch-button');+ client.click('.classification-list .react-switch-case .react-switch-button')client.waitForElementVisible(`${classColorBoxId}0.disabled-classification`, TIME_LIMIT, () => {- client.expect.element(`${classColorBoxId}1.disabled-classification`).to.not.be.present;- client.assert.urlContains('(disabled=0)');- });- });- });+ client.expect.element(`${classColorBoxId}1.disabled-classification`).to.not.be.present+ client.assert.urlContains('(disabled=0)')+ })+ })+ })},'Verify that toggling class-all off updates permalink and layer-legend': (client) => {- client.click('.classification-switch-header .react-switch-case .react-switch-button');+ client.click('.classification-switch-header .react-switch-case .react-switch-button')client.waitForElementVisible(`${classColorBoxId}15.disabled-classification`, TIME_LIMIT, () => {- client.expect.element(`${classColorBoxId}0.disabled-classification`).to.be.present;- client.expect.element(`${classColorBoxId}1.disabled-classification`).to.be.present;- client.assert.urlContains('(disabled=0-1-2-3-4-5-6-7-8-9-10-11-12-13-14-15)');- });+ client.expect.element(`${classColorBoxId}0.disabled-classification`).to.be.present+ client.expect.element(`${classColorBoxId}1.disabled-classification`).to.be.present+ client.assert.urlContains('(disabled=0-1-2-3-4-5-6-7-8-9-10-11-12-13-14-15)')+ })},'Verify that toggling class-all on updates permalink and layer-legend': (client) => {- client.click('.classification-switch-header .react-switch-case .react-switch-button');- client.pause(1000);- client.expect.element(`${classColorBoxId}0.disabled-classification`).to.not.be.present;- client.expect.element(`${classColorBoxId}15.disabled-classification`).to.not.be.present;+ client.click('.classification-switch-header .react-switch-case .react-switch-button')+ client.pause(1000)+ client.expect.element(`${classColorBoxId}0.disabled-classification`).to.not.be.present+ client.expect.element(`${classColorBoxId}15.disabled-classification`).to.not.be.present},'Verify that loaded permalink disables classes': (client) => {- client.url(client.globals.url + disabledPermalink);+ client.url(client.globals.url + disabledPermalink)client.waitForElementVisible(`${classColorBoxId}0`, TIME_LIMIT, () => {- client.expect.element(`${classColorBoxId}0.disabled-classification`).to.be.present;- client.expect.element(`${classColorBoxId}13.disabled-classification`).to.be.present;- client.expect.element(`${classColorBoxId}6.disabled-classification`).to.be.present;- client.expect.element(`${classColorBoxId}5.disabled-classification`).to.not.be.present;- client.expect.element(`${classColorBoxId}11.disabled-classification`).to.not.be.present;- client.expect.element(`${classColorBoxId}3.disabled-classification`).to.not.be.present;- });+ client.expect.element(`${classColorBoxId}0.disabled-classification`).to.be.present+ client.expect.element(`${classColorBoxId}13.disabled-classification`).to.be.present+ client.expect.element(`${classColorBoxId}6.disabled-classification`).to.be.present+ client.expect.element(`${classColorBoxId}5.disabled-classification`).to.not.be.present+ client.expect.element(`${classColorBoxId}11.disabled-classification`).to.not.be.present+ client.expect.element(`${classColorBoxId}3.disabled-classification`).to.not.be.present+ })},- after(client) {- client.end();- },-};+ after (client) {+ client.end()+ }+}diff --git a/e2e/features/projections/projections-test.js b/e2e/features/projections/projections-test.jsindex 982e3d51f..7cf6ad75c 100644--- a/e2e/features/projections/projections-test.js+++ b/e2e/features/projections/projections-test.js@@ -1,40 +1,40 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');-const { switchProjection } = require('../../reuseables/switch-projection');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')+const { switchProjection } = require('../../reuseables/switch-projection')const {geographicMap,arcticMap,antarcticMap,- projToolbarButton,-} = localSelectors;+ projToolbarButton+} = localSelectors-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {before: (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},// A button with a projection (globe) icon is visible and unobstructed, map shows data in a geographic projection'Verify default page shows projection toolbar button in geographic projection map': (c) => {- c.expect.element(projToolbarButton).to.be.visible;- c.expect.element(geographicMap).to.be.visible;+ c.expect.element(projToolbarButton).to.be.visible+ c.expect.element(geographicMap).to.be.visible},// Select "Arctic" from the menu. The map shows data in a stereographic projection centered at the North Pole.'Verify changing projection to arctic switches map to arctic': (c) => {- switchProjection(c, 'arctic');- c.expect.element(arcticMap).to.be.visible;+ switchProjection(c, 'arctic')+ c.expect.element(arcticMap).to.be.visible},// Select "Antarctic" from the menu. The map shows data in a stereographic projection centered at the South Pole.'Verify changing projection to antarctic switches map to antarctic': (c) => {- switchProjection(c, 'antarctic');- c.expect.element(antarcticMap).to.be.visible;+ switchProjection(c, 'antarctic')+ c.expect.element(antarcticMap).to.be.visible},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/share/share-test.js b/e2e/features/share/share-test.jsindex 288a2d3c2..64f6dbdc8 100644--- a/e2e/features/share/share-test.js+++ b/e2e/features/share/share-test.js@@ -1,27 +1,27 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000const {shareToolbar,shareToolbarButton,- shareLinkInput,-} = localSelectors;+ shareLinkInput+} = localSelectorsconst linkShareNav = '.link-share-nav';// const embedShareNav = '.embed-share-nav';const socialShareNav = '.social-share-nav';module.exports = {- before(c) {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ before (c) {+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},'Clicking the share link button opens the share dialog': (c) => {- c.waitForElementVisible(shareToolbarButton, TIME_LIMIT);- c.click(shareToolbarButton);- c.waitForElementVisible(shareToolbar, TIME_LIMIT);- c.expect.element(shareToolbar).to.be.present;+ c.waitForElementVisible(shareToolbarButton, TIME_LIMIT)+ c.click(shareToolbarButton)+ c.waitForElementVisible(shareToolbar, TIME_LIMIT)+ c.expect.element(shareToolbar).to.be.present},'Share tabs link, embed, and social are visible and enabled': (c) => {c.expect.element(linkShareNav).to.be.present;@@ -30,59 +30,59 @@ module.exports = {c.assert.cssClassPresent(`${linkShareNav} a`, 'active');},'Share link clipboard with existing time query string param in the page url will have the same serialized time': (c) => {- const queryString = '?t=2018-12-31';- c.url(c.globals.url + queryString);- c.waitForElementVisible(shareToolbarButton, TIME_LIMIT);- c.click(shareToolbarButton);- c.assert.urlContains('t=');- c.assert.attributeContains(shareLinkInput, 'value', `${c.globals.url}?t=2018-12-31-T00%3A00%3A00Z`);+ const queryString = '?t=2018-12-31'+ c.url(c.globals.url + queryString)+ c.waitForElementVisible(shareToolbarButton, TIME_LIMIT)+ c.click(shareToolbarButton)+ c.assert.urlContains('t=')+ c.assert.attributeContains(shareLinkInput, 'value', `${c.globals.url}?t=2018-12-31-T00%3A00%3A00Z`)},'Share link clipboard with no time query string param in the page url will have the same serialized time (partial YYYY-MM-DD)': (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.waitForElementVisible(shareToolbarButton, TIME_LIMIT);- c.click(shareToolbarButton);- const minutesOffset = 40 * 60000; // 40 minutes- let date = new Date(new Date().getTime() - minutesOffset);+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.waitForElementVisible(shareToolbarButton, TIME_LIMIT)+ c.click(shareToolbarButton)+ const minutesOffset = 40 * 60000 // 40 minutes+ let date = new Date(new Date().getTime() - minutesOffset)if (date.getUTCHours() < 3) {- date = new Date(date.getTime() - 86400000);+ date = new Date(date.getTime() - 86400000)}- const year = date.getUTCFullYear();- const month = date.getUTCMonth() + 1;- const day = date.getUTCDate();- const monthText = month < 10 ? `0${month}` : month;- const dayText = day < 10 ? `0${day}` : day;- c.assert.not.urlContains('t=');- c.assert.attributeContains(shareLinkInput, 'value', `t=${year}-${monthText}-${dayText}`);+ const year = date.getUTCFullYear()+ const month = date.getUTCMonth() + 1+ const day = date.getUTCDate()+ const monthText = month < 10 ? `0${month}` : month+ const dayText = day < 10 ? `0${day}` : day+ c.assert.not.urlContains('t=')+ c.assert.attributeContains(shareLinkInput, 'value', `t=${year}-${monthText}-${dayText}`)},'Clicking the social tab displays social share buttons': (c) => {- c.click(shareToolbarButton);- c.waitForElementVisible(shareToolbar, TIME_LIMIT);- c.click(`${socialShareNav} a`);- c.waitForElementVisible('#social-share', TIME_LIMIT);- c.expect.element('#fb-share').to.be.present;- c.expect.element('#tw-share').to.be.present;- c.expect.element('#rd-share').to.be.present;- c.expect.element('#email-share').to.be.present;+ c.click(shareToolbarButton)+ c.waitForElementVisible(shareToolbar, TIME_LIMIT)+ c.click(`${socialShareNav} a`)+ c.waitForElementVisible('#social-share', TIME_LIMIT)+ c.expect.element('#fb-share').to.be.present+ c.expect.element('#tw-share').to.be.present+ c.expect.element('#rd-share').to.be.present+ c.expect.element('#email-share').to.be.present},'Clicking Shorten link works with links less than 2049 characters': (c) => {- const shortQueryString = '?l=Reference_Labels_15m,Reference_Features_15m,Coastlines_15m,VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg=true&t=2022-08-10-T15%3A15%3A05Z';- c.url(c.globals.url + shortQueryString);- c.waitForElementVisible(shareToolbarButton, TIME_LIMIT);- c.click(shareToolbarButton);- c.waitForElementVisible('#wv-link-shorten-case', TIME_LIMIT);- c.click('#wv-link-shorten-case');- c.assert.cssClassPresent('#wv-link-shorten-case', 'checked');+ const shortQueryString = '?l=Reference_Labels_15m,Reference_Features_15m,Coastlines_15m,VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg=true&t=2022-08-10-T15%3A15%3A05Z'+ c.url(c.globals.url + shortQueryString)+ c.waitForElementVisible(shareToolbarButton, TIME_LIMIT)+ c.click(shareToolbarButton)+ c.waitForElementVisible('#wv-link-shorten-case', TIME_LIMIT)+ c.click('#wv-link-shorten-case')+ c.assert.cssClassPresent('#wv-link-shorten-case', 'checked')},'Clicking Shorten link is refused with links greater than 2048 characters': (c) => {- const longQueryString = '?l=MODIS_Terra_AOD_Deep_Blue_Combined,MODIS_Terra_AOD_Deep_Blue_Land,MODIS_Terra_Angstrom_Exponent_Ocean,MODIS_Terra_Angstrom_Exponent_Land,MODIS_Terra_Aerosol_Optical_Depth_3km,MODIS_Terra_Aerosol,MISR_Aerosol_Optical_Depth_Avg_Green_Monthly,VIIRS_SNPP_Angstrom_Exponent_Dark_Target_Ocean,VIIRS_SNPP_AOT_Dark_Target_Land_Ocean,VIIRS_SNPP_Angstrom_Exponent_Deep_Blue_Best_Estimate,VIIRS_SNPP_AOT_Deep_Blue_Best_Estimate,SWDB_Aerosol_Angstrom_Exponent_Monthly,SWDB_Aerosol_Optical_Thickness_550nm_Monthly,SWDB_Aerosol_Angstrom_Exponent_Daily,SWDB_Aerosol_Optical_Thickness_550nm_Daily,MERRA2_Total_Aerosol_Optical_Thickness_550nm_Extinction_Monthly,MERRA2_Total_Aerosol_Optical_Thickness_550nm_Scattering_Monthly,OMI_Absorbing_Aerosol_Optical_Thickness_MW_388,OMI_Absorbing_Aerosol_Optical_Depth,OMI_Aerosol_Optical_Depth,MODIS_Aqua_AOD_Deep_Blue_Combined,MODIS_Aqua_AOD_Deep_Blue_Land,MODIS_Aqua_Angstrom_Exponent_Ocean,MODIS_Aqua_Angstrom_Exponent_Land,MODIS_Aqua_Aerosol_Optical_Depth_3km,MODIS_Aqua_Aerosol,MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth,MODIS_Combined_Value_Added_AOD,MLS_CO_215hPa_Night,MLS_CO_215hPa_Day,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Monthly_Night,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Monthly_Day,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Night,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Day,AIRS_L2_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Night,AIRS_L2_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Day,OrbitTracks_Aura_Descending,OrbitTracks_Aura_Ascending,OrbitTracks_Aqua_Ascending,OrbitTracks_Suomi_NPP_Ascending,VIIRS_SNPP_Aerosol_Type_Deep_Blue_Best_Estimate,Reference_Labels_15m,Reference_Features_15m,Coastlines_15m,MODIS_Combined_L3_Nadir-BRDF_Daily,MODIS_Combined_MAIAC_L2G_BidirectionalReflectance_Bands143,VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg=true&t=2022-08-10-T15%3A15%3A05Z';- c.url(c.globals.url + longQueryString);- c.waitForElementVisible(shareToolbarButton, TIME_LIMIT);- c.click(shareToolbarButton);- c.waitForElementVisible('#wv-link-shorten-case', TIME_LIMIT);- c.click('#wv-link-shorten-case');- c.assert.not.cssClassPresent('#wv-link-shorten-case', 'checked');+ const longQueryString = '?l=MODIS_Terra_AOD_Deep_Blue_Combined,MODIS_Terra_AOD_Deep_Blue_Land,MODIS_Terra_Angstrom_Exponent_Ocean,MODIS_Terra_Angstrom_Exponent_Land,MODIS_Terra_Aerosol_Optical_Depth_3km,MODIS_Terra_Aerosol,MISR_Aerosol_Optical_Depth_Avg_Green_Monthly,VIIRS_SNPP_Angstrom_Exponent_Dark_Target_Ocean,VIIRS_SNPP_AOT_Dark_Target_Land_Ocean,VIIRS_SNPP_Angstrom_Exponent_Deep_Blue_Best_Estimate,VIIRS_SNPP_AOT_Deep_Blue_Best_Estimate,SWDB_Aerosol_Angstrom_Exponent_Monthly,SWDB_Aerosol_Optical_Thickness_550nm_Monthly,SWDB_Aerosol_Angstrom_Exponent_Daily,SWDB_Aerosol_Optical_Thickness_550nm_Daily,MERRA2_Total_Aerosol_Optical_Thickness_550nm_Extinction_Monthly,MERRA2_Total_Aerosol_Optical_Thickness_550nm_Scattering_Monthly,OMI_Absorbing_Aerosol_Optical_Thickness_MW_388,OMI_Absorbing_Aerosol_Optical_Depth,OMI_Aerosol_Optical_Depth,MODIS_Aqua_AOD_Deep_Blue_Combined,MODIS_Aqua_AOD_Deep_Blue_Land,MODIS_Aqua_Angstrom_Exponent_Ocean,MODIS_Aqua_Angstrom_Exponent_Land,MODIS_Aqua_Aerosol_Optical_Depth_3km,MODIS_Aqua_Aerosol,MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth,MODIS_Combined_Value_Added_AOD,MLS_CO_215hPa_Night,MLS_CO_215hPa_Day,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Monthly_Night,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Monthly_Day,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Night,AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Daily_Day,AIRS_L2_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Night,AIRS_L2_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Day,OrbitTracks_Aura_Descending,OrbitTracks_Aura_Ascending,OrbitTracks_Aqua_Ascending,OrbitTracks_Suomi_NPP_Ascending,VIIRS_SNPP_Aerosol_Type_Deep_Blue_Best_Estimate,Reference_Labels_15m,Reference_Features_15m,Coastlines_15m,MODIS_Combined_L3_Nadir-BRDF_Daily,MODIS_Combined_MAIAC_L2G_BidirectionalReflectance_Bands143,VIIRS_NOAA20_CorrectedReflectance_TrueColor(hidden),VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor&lg=true&t=2022-08-10-T15%3A15%3A05Z'+ c.url(c.globals.url + longQueryString)+ c.waitForElementVisible(shareToolbarButton, TIME_LIMIT)+ c.click(shareToolbarButton)+ c.waitForElementVisible('#wv-link-shorten-case', TIME_LIMIT)+ c.click('#wv-link-shorten-case')+ c.assert.not.cssClassPresent('#wv-link-shorten-case', 'checked')},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/smart-handoff/smart-handoff-test.js b/e2e/features/smart-handoff/smart-handoff-test.jsindex 27d6f06db..c945eed0c 100644--- a/e2e/features/smart-handoff/smart-handoff-test.js+++ b/e2e/features/smart-handoff/smart-handoff-test.js@@ -1,130 +1,130 @@-const reuseables = require('../../reuseables/skip-tour.js');+const reuseables = require('../../reuseables/skip-tour.js')const {addLayers,allCategoryHeader,layerBrowseList,- layersModalCloseButton,-} = require('../../reuseables/selectors.js');--const TIME_LIMIT = 10000;--const smartHandoffContainer = '.smart-handoff-side-panel';-const layersTab = '#layers-sidebar-tab';-const dataTabButton = '#download-sidebar-tab';-const downloadButton = '.download-btn';-const cloudRadiusRadioButton = '#C1443536017-LAADS-MODIS_Aqua_Cloud_Effective_Radius-collection-choice-label';-const SSTRadioButton = '#C1664741463-PODAAC-GHRSST_L4_MUR_Sea_Surface_Temperature-collection-choice-label';-const urlParams = '?l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m&t=2019-12-01';-const permalinkParams = '?l=GHRSST_L4_MUR_Sea_Surface_Temperature,MODIS_Aqua_Aerosol_Optical_Depth_3km&lg=true&sh=MODIS_Aqua_Aerosol_Optical_Depth_3km,C1443528505-LAADS&t=2020-02-06-T06%3A00%3A00Z';-const permalinkParams1980 = '?l=GHRSST_L4_MUR_Sea_Surface_Temperature,MODIS_Aqua_Aerosol_Optical_Depth_3km&lg=true&sh=MODIS_Aqua_Aerosol_Optical_Depth_3km,C1443528505-LAADS&t=1980-02-06-T06%3A00%3A00Z';-const extentCrossedDateline = '?v=226.32336353630282,-35.84415340249873,233.47009302183025,-31.309041515170094&l=VIIRS_NOAA20_Thermal_Anomalies_375m_All,Coastlines_15m,MODIS_Terra_CorrectedReflectance_TrueColor&lg=false&sh=VIIRS_NOAA20_Thermal_Anomalies_375m_All,C1355615368-LANCEMODIS&t=2021-08-29-T17%3A56%3A03Z';+ layersModalCloseButton+} = require('../../reuseables/selectors.js')++const TIME_LIMIT = 10000++const smartHandoffContainer = '.smart-handoff-side-panel'+const layersTab = '#layers-sidebar-tab'+const dataTabButton = '#download-sidebar-tab'+const downloadButton = '.download-btn'+const cloudRadiusRadioButton = '#C1443536017-LAADS-MODIS_Aqua_Cloud_Effective_Radius-collection-choice-label'+const SSTRadioButton = '#C1664741463-PODAAC-GHRSST_L4_MUR_Sea_Surface_Temperature-collection-choice-label'+const urlParams = '?l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m&t=2019-12-01'+const permalinkParams = '?l=GHRSST_L4_MUR_Sea_Surface_Temperature,MODIS_Aqua_Aerosol_Optical_Depth_3km&lg=true&sh=MODIS_Aqua_Aerosol_Optical_Depth_3km,C1443528505-LAADS&t=2020-02-06-T06%3A00%3A00Z'+const permalinkParams1980 = '?l=GHRSST_L4_MUR_Sea_Surface_Temperature,MODIS_Aqua_Aerosol_Optical_Depth_3km&lg=true&sh=MODIS_Aqua_Aerosol_Optical_Depth_3km,C1443528505-LAADS&t=1980-02-06-T06%3A00%3A00Z'+const extentCrossedDateline = '?v=226.32336353630282,-35.84415340249873,233.47009302183025,-31.309041515170094&l=VIIRS_NOAA20_Thermal_Anomalies_375m_All,Coastlines_15m,MODIS_Terra_CorrectedReflectance_TrueColor&lg=false&sh=VIIRS_NOAA20_Thermal_Anomalies_375m_All,C1355615368-LANCEMODIS&t=2021-08-29-T17%3A56%3A03Z'module.exports = {'Data tab is available and in default state when clicked': (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.url(c.globals.url + urlParams);+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.url(c.globals.url + urlParams)// Verify Data tab is in sidebar- c.expect.element(dataTabButton).to.be.visible;+ c.expect.element(dataTabButton).to.be.visible// Click Data Download tab to switch to Data with 'No Data Selected'- c.click(dataTabButton);- c.waitForElementVisible(smartHandoffContainer, TIME_LIMIT);+ c.click(dataTabButton)+ c.waitForElementVisible(smartHandoffContainer, TIME_LIMIT)c.expect.element('.smart-handoff-side-panel > h1')- .to.have.text.equal('None of your current layers are available for download.');+ .to.have.text.equal('None of your current layers are available for download.')},'Select "Cloud Effective Radius" layer and check that it is available for download': (c) => {// Go to layers tabs- c.click(layersTab);- c.pause(300);- c.click(addLayers);- c.pause(300);- c.click(allCategoryHeader);+ c.click(layersTab)+ c.pause(300)+ c.click(addLayers)+ c.pause(300)+ c.click(allCategoryHeader)// Add specified layer to layer listc.waitForElementVisible(layerBrowseList, TIME_LIMIT, (e) => {- c.click('#accordion-legacy-all-cloud-effective-radius');+ c.click('#accordion-legacy-all-cloud-effective-radius')c.waitForElementVisible('#accordion-legacy-all-cloud-effective-radius .measure-row-contents', TIME_LIMIT, (e) => {- c.click('#MODIS_Aqua_Cloud_Effective_Radius-checkbox');- c.pause(300);- c.click(layersModalCloseButton);- });- });+ c.click('#MODIS_Aqua_Cloud_Effective_Radius-checkbox')+ c.pause(300)+ c.click(layersModalCloseButton)+ })+ })// Switch back to download tab- c.click(dataTabButton);+ c.click(dataTabButton)// Ensure layer is now showing as an option for downloadc.waitForElementVisible(cloudRadiusRadioButton, TIME_LIMIT, (e) => {- c.click(cloudRadiusRadioButton);- c.pause(500);- });+ c.click(cloudRadiusRadioButton)+ c.pause(500)+ })// Verify granules and date are correctc.expect.element('.granule-count-header')- .to.have.text.equal('Available granules for 2019 DEC 01:');- c.waitForElementVisible('.granule-count-info', TIME_LIMIT);+ .to.have.text.equal('Available granules for 2019 DEC 01:')+ c.waitForElementVisible('.granule-count-info', TIME_LIMIT)},'Enable area of interest': (c) => {- c.click('#chk-crop-toggle');- c.waitForElementVisible('.granule-count-info', TIME_LIMIT);+ c.click('#chk-crop-toggle')+ c.waitForElementVisible('.granule-count-info', TIME_LIMIT)},'Arriving via permalink, data tab selected and granule count shows': (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.url(c.globals.url + permalinkParams);- c.expect.element(dataTabButton).to.be.visible;- c.waitForElementVisible('.granule-count-info', TIME_LIMIT);- c.expect.element('.granule-count-info').to.not.have.text.equal('NONE');+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.url(c.globals.url + permalinkParams)+ c.expect.element(dataTabButton).to.be.visible+ c.waitForElementVisible('.granule-count-info', TIME_LIMIT)+ c.expect.element('.granule-count-info').to.not.have.text.equal('NONE')},'Changing collection updates URL': (c) => {- c.click(SSTRadioButton);- c.pause(200);- c.assert.urlContains('&sh=GHRSST_L4_MUR_Sea_Surface_Temperature,C1664741463-PODAAC');+ c.click(SSTRadioButton)+ c.pause(200)+ c.assert.urlContains('&sh=GHRSST_L4_MUR_Sea_Surface_Temperature,C1664741463-PODAAC')},'Layers outside of their coverage date range are hidden from layers available for download': (c) => {- c.url(c.globals.url + permalinkParams1980);- c.expect.element(dataTabButton).to.be.visible;- c.waitForElementVisible(smartHandoffContainer, TIME_LIMIT);+ c.url(c.globals.url + permalinkParams1980)+ c.expect.element(dataTabButton).to.be.visible+ c.waitForElementVisible(smartHandoffContainer, TIME_LIMIT)c.expect.element('.smart-handoff-side-panel > h1')- .to.have.text.equal('None of your current layers are available for download.');+ .to.have.text.equal('None of your current layers are available for download.')},'Map extent entirely across dateline disables download button and displays warning for user to zoom out to see available map': (c) => {- c.url(c.globals.url + extentCrossedDateline);- c.waitForElementVisible(smartHandoffContainer, TIME_LIMIT);- c.expect.element(downloadButton).to.be.visible;- c.useCss().assert.cssClassPresent(downloadButton, 'wv-disabled');+ c.url(c.globals.url + extentCrossedDateline)+ c.waitForElementVisible(smartHandoffContainer, TIME_LIMIT)+ c.expect.element(downloadButton).to.be.visible+ c.useCss().assert.cssClassPresent(downloadButton, 'wv-disabled')c.waitForElementVisible('#data-download-unavailable-dateline-alert', TIME_LIMIT, () => {c.assert.containsText('#data-download-unavailable-dateline-alert div.wv-alert-message',- 'The map is zoomed into an area with no available data.');- });+ 'The map is zoomed into an area with no available data.')+ })},'Download via Earthdata Search': (c) => {- c.url(c.globals.url + permalinkParams);- c.waitForElementVisible(smartHandoffContainer, TIME_LIMIT);- c.click(downloadButton);+ c.url(c.globals.url + permalinkParams)+ c.waitForElementVisible(smartHandoffContainer, TIME_LIMIT)+ c.click(downloadButton)c.expect.element('#transferring-to-earthdata-search')- .to.be.present;+ .to.be.present// Check that Earthdata Search opens in new tab- c.click('#continue-btn').pause(2500);+ c.click('#continue-btn').pause(2500)c.windowHandles((tabs) => {- c.assert.equal(tabs.value.length, 2);- });+ c.assert.equal(tabs.value.length, 2)+ })},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/timeline/date-selector-test.js b/e2e/features/timeline/date-selector-test.jsindex c7005cb1f..d13c07a01 100644--- a/e2e/features/timeline/date-selector-test.js+++ b/e2e/features/timeline/date-selector-test.js@@ -1,162 +1,162 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');-const localQueryStrings = require('../../reuseables/querystrings.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')+const localQueryStrings = require('../../reuseables/querystrings.js')const {dayUp,dayDown,- dragger,-} = localSelectors;+ dragger+} = localSelectorsconst {knownDate,- subdailyLayerIntervalTimescale,-} = localQueryStrings;+ subdailyLayerIntervalTimescale+} = localQueryStrings-const dateSelectorMinuteInput = '#date-selector-main .input-wrapper-minute input';-const dateSelectorHourInput = '#date-selector-main .input-wrapper-hour input';-const dateSelectorDayInput = '#date-selector-main .input-wrapper-day input';-const dateSelectorMonthInput = '#date-selector-main .input-wrapper-month input';-const dateSelectorYearInput = '#date-selector-main .input-wrapper-year input';-const TIME_LIMIT = 20000;+const dateSelectorMinuteInput = '#date-selector-main .input-wrapper-minute input'+const dateSelectorHourInput = '#date-selector-main .input-wrapper-hour input'+const dateSelectorDayInput = '#date-selector-main .input-wrapper-day input'+const dateSelectorMonthInput = '#date-selector-main .input-wrapper-month input'+const dateSelectorYearInput = '#date-selector-main .input-wrapper-year input'+const TIME_LIMIT = 20000module.exports = {beforeEach: (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.waitForElementVisible(dragger, TIME_LIMIT);+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.waitForElementVisible(dragger, TIME_LIMIT)},// verify subdaily default year, month, day, hour, minute date selector inputs'Verify subdaily default year, month, day, hour, minute date selector inputs': (c) => {- c.url(c.globals.url + subdailyLayerIntervalTimescale);- c.waitForElementVisible(dragger, TIME_LIMIT);- c.expect.element(dateSelectorMinuteInput).to.be.visible;- c.expect.element(dateSelectorHourInput).to.be.visible;- c.expect.element(dateSelectorDayInput).to.be.visible;- c.expect.element(dateSelectorMonthInput).to.be.visible;- c.expect.element(dateSelectorYearInput).to.be.visible;- c.end();+ c.url(c.globals.url + subdailyLayerIntervalTimescale)+ c.waitForElementVisible(dragger, TIME_LIMIT)+ c.expect.element(dateSelectorMinuteInput).to.be.visible+ c.expect.element(dateSelectorHourInput).to.be.visible+ c.expect.element(dateSelectorDayInput).to.be.visible+ c.expect.element(dateSelectorMonthInput).to.be.visible+ c.expect.element(dateSelectorYearInput).to.be.visible+ c.end()},// verify change date using left/right date arrows'Change date using left/right arrows': (c) => {- c.url(c.globals.url + knownDate);- c.assert.attributeContains(dateSelectorDayInput, 'value', '22');- c.click('#left-arrow-group');- c.assert.attributeContains(dateSelectorDayInput, 'value', '21');- c.click('#right-arrow-group');- c.assert.attributeContains(dateSelectorDayInput, 'value', '22');+ c.url(c.globals.url + knownDate)+ c.assert.attributeContains(dateSelectorDayInput, 'value', '22')+ c.click('#left-arrow-group')+ c.assert.attributeContains(dateSelectorDayInput, 'value', '21')+ c.click('#right-arrow-group')+ c.assert.attributeContains(dateSelectorDayInput, 'value', '22')},// verify default left arrow enabled since loaded on current day'Left timeline arrow will not be disabled by default': (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.assert.not.cssClassPresent('#left-arrow-group', 'button-disabled');+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.assert.not.cssClassPresent('#left-arrow-group', 'button-disabled')},// verify default right arrow disabled since loaded on current day'Right timeline arrow will be disabled by default': (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.assert.cssClassPresent('#right-arrow-group', 'button-disabled');+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.assert.cssClassPresent('#right-arrow-group', 'button-disabled')},// verify default now button disabled'Now button will be disabled by default': (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.assert.cssClassPresent('#now-button-group', 'button-disabled');+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.assert.cssClassPresent('#now-button-group', 'button-disabled')},// verify valid right arrow enabled since NOT loaded on current day'Right timeline arrow will not be disabled': (c) => {- c.url(c.globals.url + knownDate);- c.assert.not.cssClassPresent('#right-arrow-group', 'button-disabled');+ c.url(c.globals.url + knownDate)+ c.assert.not.cssClassPresent('#right-arrow-group', 'button-disabled')},// verify now button enabled since NOT loaded on current day'Now button will not be disabled if date is not on now': (c) => {- c.url(c.globals.url + knownDate);- c.assert.not.cssClassPresent('#now-button-group', 'button-disabled');+ c.url(c.globals.url + knownDate)+ c.assert.not.cssClassPresent('#now-button-group', 'button-disabled')},// verify date selector is populated with date YYYY-MON-DD'Verify date selector is populated with date YYYY-MON-DD': (c) => {- c.url(`${c.globals.url}?t=2019-02-22`);- c.assert.attributeContains(dateSelectorDayInput, 'value', '22');- c.assert.attributeContains(dateSelectorMonthInput, 'value', 'FEB');- c.assert.attributeContains(dateSelectorYearInput, 'value', '2019');+ c.url(`${c.globals.url}?t=2019-02-22`)+ c.assert.attributeContains(dateSelectorDayInput, 'value', '22')+ c.assert.attributeContains(dateSelectorMonthInput, 'value', 'FEB')+ c.assert.attributeContains(dateSelectorYearInput, 'value', '2019')},// verify subdaily date selector is populated with date YYYY-MON-DD-HH-MM'Verify subdaily date selector is populated with date YYYY-MON-DD-HH-MM': (c) => {- c.url(c.globals.url + subdailyLayerIntervalTimescale);+ c.url(c.globals.url + subdailyLayerIntervalTimescale)- c.assert.attributeContains(dateSelectorMinuteInput, 'value', '46');- c.assert.attributeContains(dateSelectorHourInput, 'value', '09');- c.assert.attributeContains(dateSelectorDayInput, 'value', '04');- c.assert.attributeContains(dateSelectorMonthInput, 'value', 'OCT');- c.assert.attributeContains(dateSelectorYearInput, 'value', '2019');+ c.assert.attributeContains(dateSelectorMinuteInput, 'value', '46')+ c.assert.attributeContains(dateSelectorHourInput, 'value', '09')+ c.assert.attributeContains(dateSelectorDayInput, 'value', '04')+ c.assert.attributeContains(dateSelectorMonthInput, 'value', 'OCT')+ c.assert.attributeContains(dateSelectorYearInput, 'value', '2019')},// verify user can temporarily input incorrect day values in date selector'Allow invalid day values in date selector': (c) => {- c.url(`${c.globals.url}?t=2019-02-22`);+ c.url(`${c.globals.url}?t=2019-02-22`)c.click(dateSelectorDayInput).sendKeys(dateSelectorDayInput, [31, c.Keys.ENTER])- .pause(500);- c.assert.hasClass(dateSelectorDayInput, 'invalid-input');+ .pause(500)+ c.assert.hasClass(dateSelectorDayInput, 'invalid-input')},// verify user can change year on invalid date to a valid one and remove invalid-input class'Allow invalid year to valid year values in date selector': (c) => {- c.url(`${c.globals.url}?t=2019-02-22`);+ c.url(`${c.globals.url}?t=2019-02-22`)c.click(dateSelectorYearInput)- .sendKeys(dateSelectorYearInput, 2020);- c.sendKeys(dateSelectorMonthInput, 'MAR');- c.sendKeys(dateSelectorDayInput, 31);- c.sendKeys(dateSelectorYearInput, 2019);- c.assert.not.cssClassPresent(dateSelectorDayInput, 'invalid-input');- c.assert.not.cssClassPresent(dateSelectorMonthInput, 'invalid-input');- c.assert.not.cssClassPresent(dateSelectorYearInput, 'invalid-input');+ .sendKeys(dateSelectorYearInput, 2020)+ c.sendKeys(dateSelectorMonthInput, 'MAR')+ c.sendKeys(dateSelectorDayInput, 31)+ c.sendKeys(dateSelectorYearInput, 2019)+ c.assert.not.cssClassPresent(dateSelectorDayInput, 'invalid-input')+ c.assert.not.cssClassPresent(dateSelectorMonthInput, 'invalid-input')+ c.assert.not.cssClassPresent(dateSelectorYearInput, 'invalid-input')},// verify invalid permalink date rolls over to valid date YYYY-MON-DD (e.g., 2013-02-29 becomes 2013-03-01)'Verify invalid days are rolled over': (c) => {- c.url(`${c.globals.url}?t=2013-02-29`);- c.assert.attributeContains(dateSelectorDayInput, 'value', '01');- c.assert.attributeContains(dateSelectorMonthInput, 'value', 'MAR');- c.assert.attributeContains(dateSelectorYearInput, 'value', '2013');+ c.url(`${c.globals.url}?t=2013-02-29`)+ c.assert.attributeContains(dateSelectorDayInput, 'value', '01')+ c.assert.attributeContains(dateSelectorMonthInput, 'value', 'MAR')+ c.assert.attributeContains(dateSelectorYearInput, 'value', '2013')},// date selector up arrow rolls over from Feb 28 to 1 (non leap year) and the inverse'Date selector up arrow rolls over from Feb 28 to 1 (non leap year) and the inverse': (c) => {- c.url(`${c.globals.url}?t=2013-02-28`);- c.waitForElementVisible(dragger, TIME_LIMIT);- c.click(dayUp).pause(500);+ c.url(`${c.globals.url}?t=2013-02-28`)+ c.waitForElementVisible(dragger, TIME_LIMIT)+ c.click(dayUp).pause(500)- c.assert.attributeContains(dateSelectorDayInput, 'value', '01');- c.assert.attributeContains(dateSelectorMonthInput, 'value', 'FEB');- c.assert.attributeContains(dateSelectorYearInput, 'value', '2013');+ c.assert.attributeContains(dateSelectorDayInput, 'value', '01')+ c.assert.attributeContains(dateSelectorMonthInput, 'value', 'FEB')+ c.assert.attributeContains(dateSelectorYearInput, 'value', '2013')- c.click(dayDown).pause(500);+ c.click(dayDown).pause(500)- c.assert.attributeContains(dateSelectorDayInput, 'value', '28');- c.assert.attributeContains(dateSelectorMonthInput, 'value', 'FEB');- c.assert.attributeContains(dateSelectorYearInput, 'value', '2013');+ c.assert.attributeContains(dateSelectorDayInput, 'value', '28')+ c.assert.attributeContains(dateSelectorMonthInput, 'value', 'FEB')+ c.assert.attributeContains(dateSelectorYearInput, 'value', '2013')},// verify right timeline arrow is not disabled for future date'Added future layer and right timeline arrow is not disabled': (c) => {- c.url(`${c.globals.url}?mockFutureLayer=VIIRS_SNPP_CorrectedReflectance_TrueColor,3D`);- c.waitForElementVisible(dragger, TIME_LIMIT);- c.assert.not.cssClassPresent('#right-arrow-group', 'button-disabled');- c.click('#right-arrow-group');- c.assert.not.cssClassPresent('#right-arrow-group', 'button-disabled');- c.click('#right-arrow-group');+ c.url(`${c.globals.url}?mockFutureLayer=VIIRS_SNPP_CorrectedReflectance_TrueColor,3D`)+ c.waitForElementVisible(dragger, TIME_LIMIT)+ c.assert.not.cssClassPresent('#right-arrow-group', 'button-disabled')+ c.click('#right-arrow-group')+ c.assert.not.cssClassPresent('#right-arrow-group', 'button-disabled')+ c.click('#right-arrow-group')},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/timeline/layer-coverage-panel.js b/e2e/features/timeline/layer-coverage-panel.jsindex ab1be073d..5f2b5b514 100644--- a/e2e/features/timeline/layer-coverage-panel.js+++ b/e2e/features/timeline/layer-coverage-panel.js@@ -1,55 +1,55 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localQueryStrings = require('../../reuseables/querystrings.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localQueryStrings = require('../../reuseables/querystrings.js')-const layerCoverageContainer = '.timeline-layer-coverage-container';-const layerCoverageHandle = '#timeline-layer-coverage-panel-handle';-const matchingLayerCoverageAxisLine = '.axis-matching-layer-coverage-line';-const TIME_LIMIT = 20000;+const layerCoverageContainer = '.timeline-layer-coverage-container'+const layerCoverageHandle = '#timeline-layer-coverage-panel-handle'+const matchingLayerCoverageAxisLine = '.axis-matching-layer-coverage-line'+const TIME_LIMIT = 20000module.exports = {beforeEach: (client) => {- reuseables.loadAndSkipTour(client, TIME_LIMIT);+ reuseables.loadAndSkipTour(client, TIME_LIMIT)},// verify default layer coverage is visible on the timeline axis'Layer coverage is shown by default': (client) => {- client.waitForElementVisible(matchingLayerCoverageAxisLine, TIME_LIMIT);+ client.waitForElementVisible(matchingLayerCoverageAxisLine, TIME_LIMIT)},// verify no layer coverage is visible on the timeline axis with just reference layers loaded'No layer coverage is shown by default': (client) => {- client.url(client.globals.url + localQueryStrings.referenceLayersOnly);- client.waitForElementVisible(layerCoverageHandle, TIME_LIMIT);- client.expect.element(matchingLayerCoverageAxisLine).to.not.be.present;+ client.url(client.globals.url + localQueryStrings.referenceLayersOnly)+ client.waitForElementVisible(layerCoverageHandle, TIME_LIMIT)+ client.expect.element(matchingLayerCoverageAxisLine).to.not.be.present},// verify panel is hidden and handle is visible on page load'Panel is hidden on page load': (client) => {- client.waitForElementVisible(layerCoverageHandle, TIME_LIMIT);+ client.waitForElementVisible(layerCoverageHandle, TIME_LIMIT)},// verify panel opens on handle click'Panel opens on handle click': (client) => {- client.waitForElementVisible(layerCoverageHandle, TIME_LIMIT);+ client.waitForElementVisible(layerCoverageHandle, TIME_LIMIT)client.click(layerCoverageHandle)- .pause(1000);- client.expect.element(layerCoverageContainer).to.be.visible;+ .pause(1000)+ client.expect.element(layerCoverageContainer).to.be.visible},// verify no hidden layers are visible by default on page load'No hidden layers are visible in layer panel by default': (client) => {- client.waitForElementVisible(layerCoverageHandle, TIME_LIMIT);+ client.waitForElementVisible(layerCoverageHandle, TIME_LIMIT)client.click(layerCoverageHandle)- .pause(1000);- client.expect.element(layerCoverageContainer).to.be.visible;+ .pause(1000)+ client.expect.element(layerCoverageContainer).to.be.visibleclient.elements('css selector', '.layer-coverage-layer-list > div', (result) => {- client.assert.equal(result.value.length, 1);- });+ client.assert.equal(result.value.length, 1)+ })},after: (client) => {- client.end();- },-};+ client.end()+ }+}diff --git a/e2e/features/timeline/timeline-mobile-test.js b/e2e/features/timeline/timeline-mobile-test.jsindex ca3e8be84..c510065a5 100644--- a/e2e/features/timeline/timeline-mobile-test.js+++ b/e2e/features/timeline/timeline-mobile-test.js@@ -1,58 +1,58 @@-const skipTour = require('../../reuseables/skip-tour.js');+const skipTour = require('../../reuseables/skip-tour.js')-const mobileDatePickerSelectBtn = '.mobile-date-picker-select-btn';-const nextDayArrowContainer = '#right-arrow-group';-const datepickerHeader = '.datepicker .datepicker-header';-const TIME_LIMIT = 10000;+const mobileDatePickerSelectBtn = '.mobile-date-picker-select-btn'+const nextDayArrowContainer = '#right-arrow-group'+const datepickerHeader = '.datepicker .datepicker-header'+const TIME_LIMIT = 10000-const { datePickerWheel } = require('../../reuseables/selectors.js');+const { datePickerWheel } = require('../../reuseables/selectors.js')module.exports = {before: (c) => {- skipTour.loadAndSkipTour(c, TIME_LIMIT);- c.url(`${c.globals.url}?now=2013-03-15T0`);- c.setWindowSize(375, 667); // iPhone 6/7/8 dimensions+ skipTour.loadAndSkipTour(c, TIME_LIMIT)+ c.url(`${c.globals.url}?now=2013-03-15T0`)+ c.setWindowSize(375, 667) // iPhone 6/7/8 dimensions},'date.mob.init.2a: Before 3:00 UTC: load yesterdays date': (c) => {c.waitForElementVisible(mobileDatePickerSelectBtn, TIME_LIMIT, (e) => {- c.assert.containsText(mobileDatePickerSelectBtn, '2013 MAR 14');- });+ c.assert.containsText(mobileDatePickerSelectBtn, '2013 MAR 14')+ })},'date.mob.init.2b: Before 3:00 UTC: right button is not disabled': (c) => {- c.expect.element(nextDayArrowContainer).to.be.present;- c.expect.element(`${nextDayArrowContainer}.button-disabled`).to.not.be.present;- c.click(nextDayArrowContainer);- c.waitForElementVisible(`${nextDayArrowContainer}.button-disabled`, TIME_LIMIT);+ c.expect.element(nextDayArrowContainer).to.be.present+ c.expect.element(`${nextDayArrowContainer}.button-disabled`).to.not.be.present+ c.click(nextDayArrowContainer)+ c.waitForElementVisible(`${nextDayArrowContainer}.button-disabled`, TIME_LIMIT)},'date.mob.init.3a: After 3:00 UTC: load todays date': (c) => {- c.url(`${c.globals.url}?now=2013-03-15T4`);+ c.url(`${c.globals.url}?now=2013-03-15T4`)c.waitForElementVisible(mobileDatePickerSelectBtn, TIME_LIMIT, (e) => {- c.assert.containsText(mobileDatePickerSelectBtn, '2013 MAR 15');- });+ c.assert.containsText(mobileDatePickerSelectBtn, '2013 MAR 15')+ })},'date.mob.init.3b:After 3:00 UTC: right button is disabled': (c) => {- c.expect.element(nextDayArrowContainer).to.be.present;- c.expect.element(`${nextDayArrowContainer}.button-disabled`).to.be.present;+ c.expect.element(nextDayArrowContainer).to.be.present+ c.expect.element(`${nextDayArrowContainer}.button-disabled`).to.be.present},'date.mob.range.1: Date label should show 2013-07-20': (c) => {- c.url(`${c.globals.url}?now=2013-03-15T12`);+ c.url(`${c.globals.url}?now=2013-03-15T12`)c.waitForElementVisible(mobileDatePickerSelectBtn, TIME_LIMIT, (e) => {- c.assert.containsText(mobileDatePickerSelectBtn, '2013 MAR 15');- });+ c.assert.containsText(mobileDatePickerSelectBtn, '2013 MAR 15')+ })},'date.mob.range.2: mobile selector header should show 2013 MAR 15': (c) => {- c.click(mobileDatePickerSelectBtn);+ c.click(mobileDatePickerSelectBtn)c.waitForElementVisible(datepickerHeader, TIME_LIMIT, (e) => {- c.assert.containsText(datepickerHeader, '2013 MAR 15');- });+ c.assert.containsText(datepickerHeader, '2013 MAR 15')+ })},'date.mob.range.3: Date label should show 2012 MAR 15 after year drag': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.perform(function() {- const actions = this.actions({ async: true });- const wheel = c.findElement(datePickerWheel);+ c.perform(function () {+ const actions = this.actions({ async: true })+ const wheel = c.findElement(datePickerWheel)return actions.pause(300).move({ origin: wheel })@@ -62,28 +62,28 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: 40,+ y: 40}).pause(300)- .release();- });- c.pause(300);- c.useCss();- c.assert.containsText(datepickerHeader, '2012 MAR 15');+ .release()+ })+ c.pause(300)+ c.useCss()+ c.assert.containsText(datepickerHeader, '2012 MAR 15')},'date.mob.range.4: Date in header should be 2012 JAN 15 after month drag': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.perform(function() {- const actions = this.actions({ async: true });- const wheel = c.findElement(datePickerWheel);+ c.perform(function () {+ const actions = this.actions({ async: true })+ const wheel = c.findElement(datePickerWheel)return actions.pause(300).move({origin: wheel,x: 100,- y: 0,+ y: 0}).pause(300).press()@@ -91,7 +91,7 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: 40,+ y: 40}).pause(300).release()@@ -99,7 +99,7 @@ module.exports = {.move({origin: wheel,x: 100,- y: 0,+ y: 0}).pause(300).press()@@ -107,29 +107,29 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: 40,+ y: 40}).pause(300)- .release();- });- c.pause(300);- c.useCss();- c.assert.containsText(datepickerHeader, '2012 JAN 15');+ .release()+ })+ c.pause(300)+ c.useCss()+ c.assert.containsText(datepickerHeader, '2012 JAN 15')},'date.mob.range.5: Date in header should be 2012 JAN 19 after day drag': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.perform(function() {- const actions = this.actions({ async: true });- const wheel = c.findElement(datePickerWheel);+ c.perform(function () {+ const actions = this.actions({ async: true })+ const wheel = c.findElement(datePickerWheel)return actions.pause(300).move({origin: wheel,x: 275,- y: 0,+ y: 0}).pause(300).press()@@ -137,7 +137,7 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: -40,+ y: -40}).pause(300).release()@@ -145,7 +145,7 @@ module.exports = {.move({origin: wheel,x: 275,- y: 0,+ y: 0}).pause(300).press()@@ -153,7 +153,7 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: -40,+ y: -40}).pause(300).release()@@ -161,7 +161,7 @@ module.exports = {.move({origin: wheel,x: 275,- y: 0,+ y: 0}).pause(300).press()@@ -169,7 +169,7 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: -40,+ y: -40}).pause(300).release()@@ -177,7 +177,7 @@ module.exports = {.move({origin: wheel,x: 275,- y: 0,+ y: 0}).pause(300).press()@@ -185,69 +185,69 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: -40,+ y: -40}).pause(300).release()- .pause(300);- });- c.pause(800);- c.useCss();- c.assert.containsText(datepickerHeader, '2012 JAN 19');+ .pause(300)+ })+ c.pause(800)+ c.useCss()+ c.assert.containsText(datepickerHeader, '2012 JAN 19')},'date.mob.range.6: Click okay button verify date has updated': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.useXpath().click("//a[text()='OK']");- c.pause(300);- c.useCss();- c.assert.containsText(mobileDatePickerSelectBtn, '2012 JAN 19');+ c.useXpath().click("//a[text()='OK']")+ c.pause(300)+ c.useCss()+ c.assert.containsText(mobileDatePickerSelectBtn, '2012 JAN 19')},'date.mob.nav.1: Date label should show 2013 JUL 20': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.url(`${c.globals.url}?now=2014-03-15&t=2013-07-20T12`);+ c.url(`${c.globals.url}?now=2014-03-15&t=2013-07-20T12`)c.waitForElementVisible(mobileDatePickerSelectBtn, TIME_LIMIT, (e) => {- c.assert.containsText(mobileDatePickerSelectBtn, '2013 JUL 20');- });+ c.assert.containsText(mobileDatePickerSelectBtn, '2013 JUL 20')+ })},'date.mob.nav.2a: mobile selector header should show 2013 JUL 20': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.click(mobileDatePickerSelectBtn);+ c.click(mobileDatePickerSelectBtn)c.waitForElementVisible(datepickerHeader, TIME_LIMIT, (e) => {- c.assert.containsText(datepickerHeader, '2013 JUL 20');- });+ c.assert.containsText(datepickerHeader, '2013 JUL 20')+ })},'date.mob.nav.2b: Year 2014 should be disabled and 2013 is not': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}c.waitForElementVisible(datepickerHeader, TIME_LIMIT, () => {- c.useXpath(); // https://github.com/nightwatchjs/nightwatch/issues/633#issuecomment-222968466- c.expect.element("//li[contains(@class, 'disabled') and text()='2014']").to.be.present;- c.expect.element("//li[contains(@class, 'disabled') and text()='2013']").to.not.be.present;- c.expect.element("//li[text()='2013']").to.be.present;- c.useCss();- });+ c.useXpath() // https://github.com/nightwatchjs/nightwatch/issues/633#issuecomment-222968466+ c.expect.element("//li[contains(@class, 'disabled') and text()='2014']").to.be.present+ c.expect.element("//li[contains(@class, 'disabled') and text()='2013']").to.not.be.present+ c.expect.element("//li[text()='2013']").to.be.present+ c.useCss()+ })},'date.mob.nav.3: Date in header should be 2013 FEB 20 after year drag': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.pause(500);- c.perform(function() {- const actions = this.actions({ async: true });- const wheel = c.findElement(datePickerWheel);+ c.pause(500)+ c.perform(function () {+ const actions = this.actions({ async: true })+ const wheel = c.findElement(datePickerWheel)return actions.pause(300).move({origin: wheel,x: 100,- y: 0,+ y: 0}).pause(300).press()@@ -255,7 +255,7 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: 40,+ y: 40}).pause(300).release()@@ -263,7 +263,7 @@ module.exports = {.move({origin: wheel,x: 100,- y: 0,+ y: 0}).pause(300).press()@@ -271,7 +271,7 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: 40,+ y: 40}).pause(300).release()@@ -279,7 +279,7 @@ module.exports = {.move({origin: wheel,x: 100,- y: 0,+ y: 0}).pause(300).press()@@ -287,7 +287,7 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: 40,+ y: 40}).pause(300).release()@@ -295,7 +295,7 @@ module.exports = {.move({origin: wheel,x: 100,- y: 0,+ y: 0}).pause(300).press()@@ -303,7 +303,7 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: 40,+ y: 40}).pause(300).release()@@ -311,7 +311,7 @@ module.exports = {.move({origin: wheel,x: 100,- y: 0,+ y: 0}).pause(300).press()@@ -319,26 +319,26 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: 40,+ y: 40}).pause(300)- .release();- });- c.pause(300);- c.useCss();- c.assert.containsText(datepickerHeader, '2013 FEB 20');+ .release()+ })+ c.pause(300)+ c.useCss()+ c.assert.containsText(datepickerHeader, '2013 FEB 20')},'date.mob.nav.4: Date label should show 2014 FEB 20 after year drag': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.perform(function() {- const actions = this.actions({ async: true });- const wheel = c.findElement(datePickerWheel);+ c.perform(function () {+ const actions = this.actions({ async: true })+ const wheel = c.findElement(datePickerWheel)return actions.pause(300).move({- origin: wheel,+ origin: wheel}).pause(300).press()@@ -346,28 +346,28 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: -40,+ y: -40}).pause(300)- .release();- });- c.pause(300);- c.useCss();- c.assert.containsText(datepickerHeader, '2014 FEB 20');+ .release()+ })+ c.pause(300)+ c.useCss()+ c.assert.containsText(datepickerHeader, '2014 FEB 20')},'date.mob.nav.5: Date in header should be 2013 DEC 20 after year drag': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.perform(function() {- const actions = this.actions({ async: true });- const wheel = c.findElement(datePickerWheel);+ c.perform(function () {+ const actions = this.actions({ async: true })+ const wheel = c.findElement(datePickerWheel)return actions.pause(300).move({origin: wheel,x: 100,- y: 0,+ y: 0}).pause(300).press()@@ -375,7 +375,7 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: 40,+ y: 40}).pause(300).release()@@ -383,7 +383,7 @@ module.exports = {.move({origin: wheel,x: 100,- y: 0,+ y: 0}).pause(300).press()@@ -391,25 +391,25 @@ module.exports = {.move({origin: 'pointer',x: 0,- y: 40,+ y: 40}).pause(300)- .release();- });- c.pause(300);- c.useCss();- c.assert.containsText(datepickerHeader, '2013 DEC 20');+ .release()+ })+ c.pause(300)+ c.useCss()+ c.assert.containsText(datepickerHeader, '2013 DEC 20')},'date.mob.nav.6: Click okay button verify date has updated to 2013 DEC 20': (c) => {if (c.options.desiredCapabilities.browserName === 'firefox') {- return;+ return}- c.useXpath().click("//a[text()='OK']");- c.pause(300);- c.useCss();- c.assert.containsText(mobileDatePickerSelectBtn, '2013 DEC 20');+ c.useXpath().click("//a[text()='OK']")+ c.pause(300)+ c.useCss()+ c.assert.containsText(mobileDatePickerSelectBtn, '2013 DEC 20')},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/timeline/timeline-test.js b/e2e/features/timeline/timeline-test.jsindex ff0a38d5c..b1cda455c 100644--- a/e2e/features/timeline/timeline-test.js+++ b/e2e/features/timeline/timeline-test.js@@ -1,95 +1,95 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');-const localQueryStrings = require('../../reuseables/querystrings.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')+const localQueryStrings = require('../../reuseables/querystrings.js')-const dateSelectorDayInput = '#date-selector-main .input-wrapper-day input';-const TIME_LIMIT = 20000;+const dateSelectorDayInput = '#date-selector-main .input-wrapper-day input'+const TIME_LIMIT = 20000module.exports = {before: (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.waitForElementVisible(localSelectors.dragger, TIME_LIMIT);+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.waitForElementVisible(localSelectors.dragger, TIME_LIMIT)},// verify timescale dragger is visible'Dragger is visible': (c) => {- c.expect.element(localSelectors.dragger).to.be.visible;+ c.expect.element(localSelectors.dragger).to.be.visible},// verify timescale is expanded by default and can be opened/closed'Timeline is expanded by default and closes/reopen on clicking timeline chevrons': (c) => {- c.expect.element('#timeline-footer').to.be.visible;+ c.expect.element('#timeline-footer').to.be.visible// hide timelinec.click('#timeline-hide')- .waitForElementNotPresent('#timeline-footer', TIME_LIMIT);- c.expect.element('#timeline-footer').to.not.be.present;+ .waitForElementNotPresent('#timeline-footer', TIME_LIMIT)+ c.expect.element('#timeline-footer').to.not.be.present// expand timelinec.click('#timeline-hide')- .waitForElementVisible('#timeline-footer', TIME_LIMIT);- c.expect.element('#timeline-footer').to.be.visible;+ .waitForElementVisible('#timeline-footer', TIME_LIMIT)+ c.expect.element('#timeline-footer').to.be.visible},// verify default MMM YYYY format is displayed on axis'verify default MMM YYYY format is displayed on axis': (c) => {- c.assert.elementPresent('.axis-grid-text-day');- c.assert.elementPresent('.axis-grid-text-year');+ c.assert.elementPresent('.axis-grid-text-day')+ c.assert.elementPresent('.axis-grid-text-year')},// verify default 1 day interval'Interval defaults to 1 DAY': (c) => {- c.assert.containsText('#current-interval', '1 DAY');+ c.assert.containsText('#current-interval', '1 DAY')},// change to month zoom level'Change to month zoom level and axis changes': (c) => {c.click('.zoom-level-change div.date-arrows.date-arrow-up')- .pause(500);- c.assert.elementPresent('.axis-grid-text-month');- c.assert.elementNotPresent('.axis-grid-text-day');- c.assert.containsText('#current-zoom', 'MONTH');+ .pause(500)+ c.assert.elementPresent('.axis-grid-text-month')+ c.assert.elementNotPresent('.axis-grid-text-day')+ c.assert.containsText('#current-zoom', 'MONTH')},// change to year zoom level'Change to year zoom level and axis changes': (c) => {c.click('.zoom-level-change div.date-arrows.date-arrow-up')- .pause(500);+ .pause(500)c.click('.zoom-level-change div.date-arrows.date-arrow-up')- .pause(500);- c.assert.elementPresent('.axis-grid-text-year');- c.assert.elementNotPresent('.axis-grid-text-month');- c.assert.containsText('#current-zoom', 'YEAR');+ .pause(500)+ c.assert.elementPresent('.axis-grid-text-year')+ c.assert.elementNotPresent('.axis-grid-text-month')+ c.assert.containsText('#current-zoom', 'YEAR')},// verify interval state restored from permalink'Interval state of HOUR restored from permalink': (c) => {- c.url(c.globals.url + localQueryStrings.subdailyLayerIntervalTimescale);+ c.url(c.globals.url + localQueryStrings.subdailyLayerIntervalTimescale)c.moveToElement('#timeline-interval-btn-container', 0, 0)- .waitForElementVisible('#current-interval', TIME_LIMIT);- c.assert.containsText('#current-interval', '1 HOUR');+ .waitForElementVisible('#current-interval', TIME_LIMIT)+ c.assert.containsText('#current-interval', '1 HOUR')},// verify subdaily default year, month, day, hour, minute, and custom intervals'Interval subdaily default year, month, day, hour, minute, and custom available': (c) => {- c.expect.element('#interval-years').to.be.visible;- c.expect.element('#interval-months').to.be.visible;- c.expect.element('#interval-days').to.be.visible;- c.expect.element('#interval-hours').to.be.visible;- c.expect.element('#interval-minutes').to.be.visible;- c.expect.element('#interval-custom-static').to.be.visible;+ c.expect.element('#interval-years').to.be.visible+ c.expect.element('#interval-months').to.be.visible+ c.expect.element('#interval-days').to.be.visible+ c.expect.element('#interval-hours').to.be.visible+ c.expect.element('#interval-minutes').to.be.visible+ c.expect.element('#interval-custom-static').to.be.visible},// verify custom interval widget panel opens'Custom interval widget opens on selecting custom': (c) => {c.click('#interval-custom-static')- .waitForElementVisible('.custom-interval-widget', TIME_LIMIT);- c.expect.element('.custom-interval-widget').to.be.visible;+ .waitForElementVisible('.custom-interval-widget', TIME_LIMIT)+ c.expect.element('.custom-interval-widget').to.be.visible},// verify changing custom interval changes current interval and how many time units change with date arrows'Select custom interval changes current interval and changes date by current interval': (c) => {- c.url(c.globals.url + localQueryStrings.knownDate);- c.assert.attributeContains(dateSelectorDayInput, 'value', '22');+ c.url(c.globals.url + localQueryStrings.knownDate)+ c.assert.attributeContains(dateSelectorDayInput, 'value', '22')c.moveToElement('#timeline-interval-btn-container', 0, 0).pause(100).click('#interval-custom-static')@@ -97,52 +97,52 @@ module.exports = {.click('.custom-interval-delta-input').setValue('.custom-interval-delta-input', [2, c.Keys.ENTER]).moveToElement('#left-arrow-group', 0, 0)- .click('#left-arrow-group');+ .click('#left-arrow-group')- c.assert.containsText('#current-interval', '2 DAY');- c.assert.attributeContains(dateSelectorDayInput, 'value', '20');+ c.assert.containsText('#current-interval', '2 DAY')+ c.assert.attributeContains(dateSelectorDayInput, 'value', '20')},// verify default day timescale zoom level'Timescale zoom level defaults to DAY': (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.assert.containsText('#current-zoom', 'DAY');+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.assert.containsText('#current-zoom', 'DAY')},// verify subdaily default year, month, day, hour, minute, and custom intervals'Timescale zoom subdaily default year, month, day, hour, minute, and custom intervals': (c) => {- c.url(c.globals.url + localQueryStrings.subdailyLayerIntervalTimescale);+ c.url(c.globals.url + localQueryStrings.subdailyLayerIntervalTimescale)c.moveToElement('#current-zoom', 0, 0)- .waitForElementVisible('#zoom-years', TIME_LIMIT);+ .waitForElementVisible('#zoom-years', TIME_LIMIT)- c.expect.element('#zoom-years').to.be.visible;- c.expect.element('#zoom-months').to.be.visible;- c.expect.element('#zoom-days').to.be.visible;- c.expect.element('#zoom-hours').to.be.visible;- c.expect.element('#zoom-minutes').to.be.visible;+ c.expect.element('#zoom-years').to.be.visible+ c.expect.element('#zoom-months').to.be.visible+ c.expect.element('#zoom-days').to.be.visible+ c.expect.element('#zoom-hours').to.be.visible+ c.expect.element('#zoom-minutes').to.be.visible},// verify timescale zoom state restored from permalink'Timescale zoom HOUR restored from permalink': (c) => {- c.waitForElementVisible('#current-zoom', TIME_LIMIT);- c.assert.containsText('#current-zoom', 'HOUR');+ c.waitForElementVisible('#current-zoom', TIME_LIMIT)+ c.assert.containsText('#current-zoom', 'HOUR')},// date tooltip date present on load'Date tooltip date present load': (c) => {- c.url(`${c.globals.url}?t=2019-02-22`);+ c.url(`${c.globals.url}?t=2019-02-22`)c.waitForElementVisible('.date-tooltip', TIME_LIMIT)- .assert.containsText('.date-tooltip', '2019 FEB 22 (DOY 053)');+ .assert.containsText('.date-tooltip', '2019 FEB 22 (DOY 053)')},// date subdaily tooltip date present on load'Date subdaily tooltip date present on load': (c) => {- c.url(c.globals.url + localQueryStrings.subdailyLayerIntervalTimescale);+ c.url(c.globals.url + localQueryStrings.subdailyLayerIntervalTimescale)c.waitForElementVisible('.date-tooltip', TIME_LIMIT)- .assert.containsText('.date-tooltip', '2019 OCT 04 09:46Z (DOY 277)');+ .assert.containsText('.date-tooltip', '2019 OCT 04 09:46Z (DOY 277)')},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/tour/tour-joyride-test.js b/e2e/features/tour/tour-joyride-test.jsindex b2d2f4468..3c42605ae 100644--- a/e2e/features/tour/tour-joyride-test.js+++ b/e2e/features/tour/tour-joyride-test.js@@ -1,91 +1,91 @@-const { normalizeViewport } = require('../../reuseables/normalize-viewport.js');+const { normalizeViewport } = require('../../reuseables/normalize-viewport.js')-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000-const tourNext = '.step-container .step-next';-const tourPrev = '.step-container .step-previous';-const anyBeacon = '.react-joyride__beacon';-const firstBeaconSelector = '#react-joyride-step-0 .react-joyride__beacon';-const secondBeaconSelector = '#react-joyride-step-1 .react-joyride__beacon';-const prevButton = '.react-joyride__tooltip div:nth-of-type(2) > button:first-of-type';-const nextButtonAfterPrev = '.react-joyride__tooltip div:nth-of-type(2) > button:nth-of-type(2)';-const tooltip = '.react-joyride__tooltip';-const tooltipTextEl = '.react-joyride__tooltip > div > div';-const tooltipClose = '.react-joyride__tooltip > button';+const tourNext = '.step-container .step-next'+const tourPrev = '.step-container .step-previous'+const anyBeacon = '.react-joyride__beacon'+const firstBeaconSelector = '#react-joyride-step-0 .react-joyride__beacon'+const secondBeaconSelector = '#react-joyride-step-1 .react-joyride__beacon'+const prevButton = '.react-joyride__tooltip div:nth-of-type(2) > button:first-of-type'+const nextButtonAfterPrev = '.react-joyride__tooltip div:nth-of-type(2) > button:nth-of-type(2)'+const tooltip = '.react-joyride__tooltip'+const tooltipTextEl = '.react-joyride__tooltip > div > div'+const tooltipClose = '.react-joyride__tooltip > button'module.exports = {- before(c) {- normalizeViewport(c, 1000, 850);- c.url(`${c.globals.url}?tr=hurricane_dorian_september_joyride&mockTour=true`);+ before (c) {+ normalizeViewport(c, 1000, 850)+ c.url(`${c.globals.url}?tr=hurricane_dorian_september_joyride&mockTour=true`)},'Verify that all tour loads properly, Joyride beacon shows after progressing to Step 2': (c) => {- c.setWindowSize(1000, 800);- c.pause(300);- c.useCss().waitForElementVisible('.tour-in-progress .step-total', TIME_LIMIT);- c.click(tourNext);- c.click('#wv-map');- c.pause(300);- c.useCss().waitForElementVisible(firstBeaconSelector, TIME_LIMIT);+ c.setWindowSize(1000, 800)+ c.pause(300)+ c.useCss().waitForElementVisible('.tour-in-progress .step-total', TIME_LIMIT)+ c.click(tourNext)+ c.click('#wv-map')+ c.pause(300)+ c.useCss().waitForElementVisible(firstBeaconSelector, TIME_LIMIT)},'Clicking beacon shows the floater tooltip': (c) => {if (c.options.desiredCapabilities.browserName !== 'firefox') { // intermittently fails on Chrome- return;+ return}// c.useCss().waitForElementVisible(firstBeaconSelector, TIME_LIMIT);- c.pause(5000);- c.click('.react-joyride__beacon');- c.waitForElementVisible(tooltip, TIME_LIMIT);+ c.pause(5000)+ c.click('.react-joyride__beacon')+ c.waitForElementVisible(tooltip, TIME_LIMIT)},'Closing tooltip advances to next step': (c) => {if (c.options.desiredCapabilities.browserName !== 'firefox') { // intermittently fails on Chrome- return;+ return}- c.useCss().waitForElementVisible(tooltipClose, TIME_LIMIT);- c.pause(500);- c.click(tooltipClose);- c.pause(500);- c.waitForElementVisible(secondBeaconSelector, TIME_LIMIT);- c.pause(500);- c.click(secondBeaconSelector);- c.waitForElementVisible(tooltip, TIME_LIMIT);+ c.useCss().waitForElementVisible(tooltipClose, TIME_LIMIT)+ c.pause(500)+ c.click(tooltipClose)+ c.pause(500)+ c.waitForElementVisible(secondBeaconSelector, TIME_LIMIT)+ c.pause(500)+ c.click(secondBeaconSelector)+ c.waitForElementVisible(tooltip, TIME_LIMIT)},'Clicking next advances to next step': (c) => {if (c.options.desiredCapabilities.browserName !== 'firefox') { // intermittently fails on Chrome- return;+ return}- c.click(nextButtonAfterPrev);- c.waitForElementVisible(tooltip, TIME_LIMIT);- c.assert.containsText(tooltipTextEl, 'THIS IS STEP 3');+ c.click(nextButtonAfterPrev)+ c.waitForElementVisible(tooltip, TIME_LIMIT)+ c.assert.containsText(tooltipTextEl, 'THIS IS STEP 3')},'Prev button goes back a step': (c) => {if (c.options.desiredCapabilities.browserName !== 'firefox') { // intermittently fails on Chrome- return;+ return}- c.click(prevButton);- c.waitForElementVisible(tooltip, TIME_LIMIT);- c.assert.containsText(tooltipTextEl, 'THIS IS STEP 2');+ c.click(prevButton)+ c.waitForElementVisible(tooltip, TIME_LIMIT)+ c.assert.containsText(tooltipTextEl, 'THIS IS STEP 2')},'Closing tooltip on last step ends the Joyride': (c) => {if (c.options.desiredCapabilities.browserName !== 'firefox') { // intermittently fails on Chrome- return;+ return}- c.click(nextButtonAfterPrev);- c.waitForElementVisible(tooltip, TIME_LIMIT);- c.click(nextButtonAfterPrev);- c.waitForElementVisible(tooltip, TIME_LIMIT);- c.click(nextButtonAfterPrev);- c.expect.element(tooltip).not.to.be.present;- c.expect.element(anyBeacon).not.to.be.present;+ c.click(nextButtonAfterPrev)+ c.waitForElementVisible(tooltip, TIME_LIMIT)+ c.click(nextButtonAfterPrev)+ c.waitForElementVisible(tooltip, TIME_LIMIT)+ c.click(nextButtonAfterPrev)+ c.expect.element(tooltip).not.to.be.present+ c.expect.element(anyBeacon).not.to.be.present},'Joyride resets when the Worldview tour is moved to a step with Joyride steps': (c) => {if (c.options.desiredCapabilities.browserName !== 'firefox') { // intermittently fails on Chrome- return;+ return}- c.click(tourNext);- c.click(tourPrev);- c.expect.element(firstBeaconSelector).to.be.present;+ c.click(tourNext)+ c.click(tourPrev)+ c.expect.element(firstBeaconSelector).to.be.present},- after(c) {- c.end();- },-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/tour/tour-test.js b/e2e/features/tour/tour-test.jsindex e91b21a77..68ff56493 100644--- a/e2e/features/tour/tour-test.js+++ b/e2e/features/tour/tour-test.js@@ -1,54 +1,54 @@-const { normalizeViewport } = require('../../reuseables/normalize-viewport.js');-const { localStorageEnabled } = require('../../reuseables/local-storage-check.js');-const localSelectors = require('../../reuseables/selectors.js');+const { normalizeViewport } = require('../../reuseables/normalize-viewport.js')+const { localStorageEnabled } = require('../../reuseables/local-storage-check.js')+const localSelectors = require('../../reuseables/selectors.js')const {- infoToolbarButton,-} = localSelectors;+ infoToolbarButton+} = localSelectors-const TIME_LIMIT = 10000;-const runTour = function(c) {- let totalSteps;- c.waitForElementVisible('.tour-start', TIME_LIMIT);- c.click('.tour-box:first-child');- c.waitForElementVisible('.tour-in-progress .step-total', 2000);+const TIME_LIMIT = 10000+const runTour = function (c) {+ let totalSteps+ c.waitForElementVisible('.tour-start', TIME_LIMIT)+ c.click('.tour-box:first-child')+ c.waitForElementVisible('.tour-in-progress .step-total', 2000)c.getText('.tour-in-progress .step-total', (result) => {- totalSteps = parseInt(result.value, 10);+ totalSteps = parseInt(result.value, 10)}).perform(() => {for (let i = 0; i < totalSteps; i += 1) {- c.pause(500);- c.click('.step-container .step-next');+ c.pause(500)+ c.click('.step-container .step-next')}})- .waitForElementVisible('.tour-complete button.close', 2000);- c.click('.tour-complete button.close');-};+ .waitForElementVisible('.tour-complete button.close', 2000)+ c.click('.tour-complete button.close')+}module.exports = {'@tags': ['localStorageDisabled'],- before(c) {- normalizeViewport(c, 1000, 850);- c.url(c.globals.url);+ before (c) {+ normalizeViewport(c, 1000, 850)+ c.url(c.globals.url)},- 'Verify that all tour modals are present when the page is loaded': function(c) {+ 'Verify that all tour modals are present when the page is loaded': function (c) {c.execute(localStorageEnabled,[],- function({ value }) {+ function ({ value }) {if (!value) {- c.waitForElementVisible(infoToolbarButton, 2000);- c.click(infoToolbarButton);- c.waitForElementVisible('#start_tour_info_item', 1000);- c.click('#start_tour_info_item');- runTour(c);+ c.waitForElementVisible(infoToolbarButton, 2000)+ c.click(infoToolbarButton)+ c.waitForElementVisible('#start_tour_info_item', 1000)+ c.click('#start_tour_info_item')+ runTour(c)} else {- runTour(c);+ runTour(c)}- },- );- },- after(c) {- c.end();+ }+ )},-};+ after (c) {+ c.end()+ }+}diff --git a/e2e/features/ui/distraction-free-mode-test.js b/e2e/features/ui/distraction-free-mode-test.jsindex c11fdc01e..44fe1766d 100644--- a/e2e/features/ui/distraction-free-mode-test.js+++ b/e2e/features/ui/distraction-free-mode-test.js@@ -1,5 +1,5 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')const {infoToolbarButton,@@ -15,14 +15,14 @@ const {snapshotToolbarButton,timelineHeader,zoomInButton,- zoomOutButton,-} = localSelectors;-const TIME_LIMIT = 5000;+ zoomOutButton+} = localSelectors+const TIME_LIMIT = 5000const closeDistractionFreeAlert = (c) => {- c.waitForElementVisible('#distraction-free-mode-active-alert-close');- c.click('#distraction-free-mode-active-alert-close');-};+ c.waitForElementVisible('#distraction-free-mode-active-alert-close')+ c.click('#distraction-free-mode-active-alert-close')+}// helper to confirm target els are removed/hidden in distraction free modeconst distractionFreeModeValidElsRemoved = (c, proj, isActive) => {@@ -35,11 +35,11 @@ const distractionFreeModeValidElsRemoved = (c, proj, isActive) => {snapshotToolbarButton,timelineHeader,zoomInButton,- zoomOutButton,- ];+ zoomOutButton+ ]const visibleEls = [- sidebarContainer,- ];+ sidebarContainer+ ]// add rotate buttons for polar projectionsif (proj !== 'geographic') {@@ -47,56 +47,56 @@ const distractionFreeModeValidElsRemoved = (c, proj, isActive) => {...presentEls,mapRotateLeft,mapRotateReset,- mapRotateRight,- ];+ mapRotateRight+ ]}if (isActive) {// distraction free mode is active and els should be removed/hidden- presentEls.forEach((el) => c.waitForElementNotPresent(el, TIME_LIMIT));- visibleEls.forEach((el) => c.waitForElementNotVisible(el, TIME_LIMIT));+ presentEls.forEach((el) => c.waitForElementNotPresent(el, TIME_LIMIT))+ visibleEls.forEach((el) => c.waitForElementNotVisible(el, TIME_LIMIT))} else {// els should be added/visible- presentEls.forEach((el) => c.waitForElementPresent(el, TIME_LIMIT));- visibleEls.forEach((el) => c.waitForElementVisible(el, TIME_LIMIT));+ presentEls.forEach((el) => c.waitForElementPresent(el, TIME_LIMIT))+ visibleEls.forEach((el) => c.waitForElementVisible(el, TIME_LIMIT))}-};+}module.exports = {before: (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.url(`${c.globals.url}?p=arctic`);+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.url(`${c.globals.url}?p=arctic`)// ensure Location Search is minimized- c.click(locationSearchMinimizeButton);+ c.click(locationSearchMinimizeButton)},// verify distraction free mode shortcut hides ui elements'Enabling distraction free mode with shortcut key hides UI elements': (c) => {- c.waitForElementVisible(infoToolbarButton);- c.click(infoToolbarButton);- c.waitForElementVisible('#distraction_free_info_item');- c.click('#distraction_free_info_item');+ c.waitForElementVisible(infoToolbarButton)+ c.click(infoToolbarButton)+ c.waitForElementVisible('#distraction_free_info_item')+ c.click('#distraction_free_info_item')- closeDistractionFreeAlert(c);- distractionFreeModeValidElsRemoved(c, 'arctic', true);+ closeDistractionFreeAlert(c)+ distractionFreeModeValidElsRemoved(c, 'arctic', true)},// verify turning off distraction free mode shortcut returns hidden ui elements'Disabling distraction free mode with shortcut key returns UI elements': (c) => {- c.sendKeys('body', [c.Keys.SHIFT, 'd', c.Keys.NULL]);- c.pause(300);+ c.sendKeys('body', [c.Keys.SHIFT, 'd', c.Keys.NULL])+ c.pause(300)- distractionFreeModeValidElsRemoved(c, 'arctic', false);+ distractionFreeModeValidElsRemoved(c, 'arctic', false)},// verify distraction free mode activates with query string parameter df (in geographic projection)'Enabling distraction free mode activates query string parameter df': (c) => {- c.url(`${c.globals.url}?df=true`);+ c.url(`${c.globals.url}?df=true`)- distractionFreeModeValidElsRemoved(c, 'geographic', true);+ distractionFreeModeValidElsRemoved(c, 'geographic', true)},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/ui/info-mobile-test.js b/e2e/features/ui/info-mobile-test.jsindex 6b40ae8b4..3e9cc16f0 100644--- a/e2e/features/ui/info-mobile-test.js+++ b/e2e/features/ui/info-mobile-test.js@@ -1,32 +1,32 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')const {- infoToolbarButton,-} = localSelectors;+ infoToolbarButton+} = localSelectors-const TIME_LIMIT = 5000;+const TIME_LIMIT = 5000module.exports = {before: (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.setWindowSize(375, 667); // iPhone 6/7/8 dimensions+ reuseables.loadAndSkipTour(c, TIME_LIMIT)+ c.setWindowSize(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': (c) => {- c.expect.element(infoToolbarButton).to.be.present;- c.pause(500);- c.click(infoToolbarButton);+ c.expect.element(infoToolbarButton).to.be.present+ c.pause(500)+ c.click(infoToolbarButton)- c.waitForElementVisible('#toolbar_info', TIME_LIMIT);- c.expect.element('#send_feedback_info_item').to.be.present;- c.expect.element('#settings_info_item').to.be.present;- c.expect.element('#about_info_item').to.be.present;- c.expect.element('#distraction_free_info_item').to.be.present;+ c.waitForElementVisible('#toolbar_info', TIME_LIMIT)+ c.expect.element('#send_feedback_info_item').to.be.present+ c.expect.element('#settings_info_item').to.be.present+ c.expect.element('#about_info_item').to.be.present+ c.expect.element('#distraction_free_info_item').to.be.present},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/features/ui/info-test.js b/e2e/features/ui/info-test.jsindex 34fb55ac5..52721668a 100644--- a/e2e/features/ui/info-test.js+++ b/e2e/features/ui/info-test.js@@ -1,41 +1,41 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')const {- infoToolbarButton,-} = localSelectors;+ infoToolbarButton+} = localSelectors-const TIME_LIMIT = 5000;+const TIME_LIMIT = 5000module.exports = {before: (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},// verify info toolbar is visible and contains valid menu items'Info toolbar is visible and contains valid menu items': (c) => {- c.expect.element(infoToolbarButton).to.be.present;- c.click(infoToolbarButton);-- c.waitForElementVisible('#toolbar_info', TIME_LIMIT);- c.expect.element('#send_feedback_info_item').to.be.present;- c.expect.element('#start_tour_info_item').to.be.present;- c.expect.element('#settings_info_item').to.be.present;- c.expect.element('#about_info_item').to.be.present;- c.expect.element('#distraction_free_info_item').to.be.present;+ c.expect.element(infoToolbarButton).to.be.present+ c.click(infoToolbarButton)++ c.waitForElementVisible('#toolbar_info', TIME_LIMIT)+ c.expect.element('#send_feedback_info_item').to.be.present+ c.expect.element('#start_tour_info_item').to.be.present+ c.expect.element('#settings_info_item').to.be.present+ c.expect.element('#about_info_item').to.be.present+ c.expect.element('#distraction_free_info_item').to.be.present},// verify about menu item opens about modal'About menu item opens about modal': (c) => {- c.click('#about_info_item');- c.pause(500);+ c.click('#about_info_item')+ c.pause(500)- c.expect.element('.about-page').to.be.present;- c.expect.element('a[href="mailto:[email protected]"]').to.be.visible;+ c.expect.element('.about-page').to.be.present+ c.expect.element('a[href="mailto:[email protected]"]').to.be.visible},after: (c) => {- c.end();- },+ c.end()+ }-};+}diff --git a/e2e/features/ui/toolbar-test.js b/e2e/features/ui/toolbar-test.jsindex ff6310799..2b8d830a3 100644--- a/e2e/features/ui/toolbar-test.js+++ b/e2e/features/ui/toolbar-test.js@@ -1,5 +1,5 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');+const reuseables = require('../../reuseables/skip-tour.js')+const localSelectors = require('../../reuseables/selectors.js')const {locationSearchComponent,@@ -7,26 +7,26 @@ const {measureBtn,projToolbarButton,shareToolbarButton,- snapshotToolbarButton,-} = localSelectors;+ snapshotToolbarButton+} = localSelectors-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {before: (c) => {- reuseables.loadAndSkipTour(c, TIME_LIMIT);+ reuseables.loadAndSkipTour(c, TIME_LIMIT)},'Verify toolbar buttons are visible by default - excluding Location Search': (c) => {- c.expect.element(locationSearchComponent).to.be.visible;- c.expect.element(locationSearchToolbarButton).to.not.be.present;- c.expect.element(shareToolbarButton).to.be.visible;- c.expect.element(projToolbarButton).to.be.visible;- c.expect.element(snapshotToolbarButton).to.be.visible;- c.expect.element(measureBtn).to.be.visible;+ c.expect.element(locationSearchComponent).to.be.visible+ c.expect.element(locationSearchToolbarButton).to.not.be.present+ c.expect.element(shareToolbarButton).to.be.visible+ c.expect.element(projToolbarButton).to.be.visible+ c.expect.element(snapshotToolbarButton).to.be.visible+ c.expect.element(measureBtn).to.be.visible},after: (c) => {- c.end();- },-};+ c.end()+ }+}diff --git a/e2e/globals.js b/e2e/globals.jsindex 2f961176f..52498b520 100644--- a/e2e/globals.js+++ b/e2e/globals.js@@ -10,8 +10,8 @@ module.exports = {notificationDismissButton: '.wv-alert .close-alert .fa-times',overlayLayerItems: '#overlays li',resolutionTooltip: '#zoom-btn-container',- notifyMessage: '.wv-alert .alert-content',+ notifyMessage: '.wv-alert .alert-content'},delay: 3000, // Acceptable delay in ms between performing actions and seeing results- timeout: 20000,-};+ timeout: 20000+}diff --git a/e2e/reuseables/bookmark.js b/e2e/reuseables/bookmark.jsindex a69e563a0..1480066fa 100644--- a/e2e/reuseables/bookmark.js+++ b/e2e/reuseables/bookmark.js@@ -1,9 +1,9 @@-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {- bookmark(c, params) {- const url = `${c.globals.url}?${params.join('&')}`;- c.url(url);- c.waitForElementVisible('#wv-logo', TIME_LIMIT);- },-};+ bookmark (c, params) {+ const url = `${c.globals.url}?${params.join('&')}`+ c.url(url)+ c.waitForElementVisible('#wv-logo', TIME_LIMIT)+ }+}diff --git a/e2e/reuseables/check-element-ordering.js b/e2e/reuseables/check-element-ordering.jsindex f5f3fc2c9..d5d89a602 100644--- a/e2e/reuseables/check-element-ordering.js+++ b/e2e/reuseables/check-element-ordering.js@@ -1,20 +1,20 @@/* eslint-disable object-shorthand */module.exports = {- checkElementOrdering: function(client, containerSelector, expectedOrderingArray) {+ checkElementOrdering: function (client, containerSelector, expectedOrderingArray) {const getElementId = (el) => {if (client.options.desiredCapabilities.browserName === 'firefox') {- return el[Object.keys(el)[0]];+ return el[Object.keys(el)[0]]}- return el.ELEMENT;- };+ return el.ELEMENT+ }client.elements('css selector', containerSelector, (result) => {result.value.forEach((el, idx) => {- const elementId = getElementId(el);- const attribute = 'id';+ const elementId = getElementId(el)+ const attribute = 'id'client.elementIdAttribute(elementId, attribute, ({ value }) => {- client.assert.equal(value, expectedOrderingArray[idx], 'element ids match');- });- });- });- },-};+ client.assert.equal(value, expectedOrderingArray[idx], 'element ids match')+ })+ })+ })+ }+}diff --git a/e2e/reuseables/click-patch-wip.js b/e2e/reuseables/click-patch-wip.jsindex 29b92e652..f879f3d39 100644--- a/e2e/reuseables/click-patch-wip.js+++ b/e2e/reuseables/click-patch-wip.js@@ -1,56 +1,56 @@/* eslint-disable no-use-before-define */module.exports = {- customMouseEvent(client, selector, offsetX, offsetY, eventType) {- eventType = eventType || 'dblclick';+ customMouseEvent (client, selector, offsetX, offsetY, eventType) {+ eventType = eventType || 'dblclick'client.execute((obj) => {const {- eventType, selector, offsetX, offsetY,- } = obj;- const el = document.querySelector(selector || 'body');+ eventType, selector, offsetX, offsetY+ } = obj+ const el = document.querySelector(selector || 'body')- function simulate(element, eventName) {+ function simulate (element, eventName) {// eslint-disable-next-line prefer-rest-params- const options = extend(defaultOptions, arguments[2] || {});- let oEvent; let eventType = null;+ const options = extend(defaultOptions, arguments[2] || {})+ let oEvent; let eventType = null// eslint-disable-next-line no-restricted-syntaxfor (const name in eventMatchers) {- if (eventMatchers[name].test(eventName)) { eventType = name; break; }+ if (eventMatchers[name].test(eventName)) { eventType = name; break }}- if (!eventType) { throw new SyntaxError('Only HTMLEvents and MouseEvents interfaces are supported'); }+ if (!eventType) { throw new SyntaxError('Only HTMLEvents and MouseEvents interfaces are supported') }if (document.createEvent) {- oEvent = document.createEvent(eventType);+ oEvent = document.createEvent(eventType)if (eventType === 'HTMLEvents') {- oEvent.initEvent(eventName, options.bubbles, options.cancelable);+ oEvent.initEvent(eventName, options.bubbles, options.cancelable)} else {oEvent.initMouseEvent(eventName, options.bubbles, options.cancelable, document.defaultView,options.button, options.pointerX, options.pointerY, options.pointerX, options.pointerY,- options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, options.button, element);+ options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, options.button, element)}- element.dispatchEvent(oEvent);+ element.dispatchEvent(oEvent)} else {- options.clientX = options.pointerX;- options.clientY = options.pointerY;- const evt = document.createEventObject();- oEvent = extend(evt, options);- element.fireEvent(`on${eventName}`, oEvent);+ options.clientX = options.pointerX+ options.clientY = options.pointerY+ const evt = document.createEventObject()+ oEvent = extend(evt, options)+ element.fireEvent(`on${eventName}`, oEvent)}- return element;+ return element}- function extend(destination, source) {+ function extend (destination, source) {Object.keys(source).forEach((property) => {- destination[property] = source[property];- });- return destination;+ destination[property] = source[property]+ })+ return destination}const eventMatchers = {HTMLEvents: /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,- MouseEvents: /^(?:click|dblclick|mouse(?:down|up|over|move|out))$/,- };+ MouseEvents: /^(?:click|dblclick|mouse(?:down|up|over|move|out))$/+ }const defaultOptions = {pointerX: 0,pointerY: 0,@@ -60,12 +60,12 @@ module.exports = {shiftKey: false,metaKey: false,bubbles: true,- cancelable: true,- };- return simulate(el, eventType, { pointerX: offsetX, pointerY: offsetY });+ cancelable: true+ }+ return simulate(el, eventType, { pointerX: offsetX, pointerY: offsetY })}, [{- eventType, selector, offsetX, offsetY,+ eventType, selector, offsetX, offsetY}], (result) => {- });- },-};+ })+ }+}diff --git a/e2e/reuseables/image-download.js b/e2e/reuseables/image-download.jsindex 92ae27609..913984530 100644--- a/e2e/reuseables/image-download.js+++ b/e2e/reuseables/image-download.js@@ -1,24 +1,24 @@-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000module.exports = {- openImageDownloadPanel(c) {- c.waitForElementNotPresent('.modal fade', TIME_LIMIT);- c.waitForElementVisible('#wv-image-button', TIME_LIMIT);- c.click('#wv-image-button');- c.pause(550);+ openImageDownloadPanel (c) {+ c.waitForElementNotPresent('.modal fade', TIME_LIMIT)+ c.waitForElementVisible('#wv-image-button', TIME_LIMIT)+ c.click('#wv-image-button')+ c.pause(550)},- closeImageDownloadPanel(c) {- c.waitForElementVisible('#toolbar_snapshot .close', TIME_LIMIT);- c.click('#toolbar_snapshot .close');- c.waitForElementNotPresent('#toolbar_snapshot', TIME_LIMIT);- c.pause(550);+ closeImageDownloadPanel (c) {+ c.waitForElementVisible('#toolbar_snapshot .close', TIME_LIMIT)+ c.click('#toolbar_snapshot .close')+ c.waitForElementNotPresent('#toolbar_snapshot', TIME_LIMIT)+ c.pause(550)},- clickDownload(c) {- c.waitForElementNotPresent('.modal fade', TIME_LIMIT);- c.waitForElementVisible('.wv-image-button', TIME_LIMIT);- c.click('.wv-image-button');- c.pause(550);- },-};+ clickDownload (c) {+ c.waitForElementNotPresent('.modal fade', TIME_LIMIT)+ c.waitForElementVisible('.wv-image-button', TIME_LIMIT)+ c.click('.wv-image-button')+ c.pause(550)+ }+}diff --git a/e2e/reuseables/layer-picker.js b/e2e/reuseables/layer-picker.jsindex 70730a55d..b247003a8 100644--- a/e2e/reuseables/layer-picker.js+++ b/e2e/reuseables/layer-picker.js@@ -1,29 +1,29 @@-const layerItem = '.item.productsitem';-const categoriesContainer = '.category-masonry-case';+const layerItem = '.item.productsitem'+const categoriesContainer = '.category-masonry-case'module.exports = {assertCategories: (client) => () => {- client.expect.element(categoriesContainer).to.be.present;- client.expect.element('#legacy-all').to.be.present;- client.expect.element('#air-quality').to.be.present;- client.expect.element('#ash-plumes').to.be.present;- client.expect.element('#drought').to.be.present;- client.expect.element('#fires').to.be.present;- client.expect.element('#floods').to.be.present;- client.expect.element('#shipping').to.be.present;- client.expect.element('#dust-storms').to.be.present;- client.expect.element('#severe-storms').to.be.present;- client.expect.element('#smoke-plumes').to.be.present;- client.expect.element('#vegetation').to.be.present;- client.expect.element('#legacy-other').to.be.present;+ client.expect.element(categoriesContainer).to.be.present+ client.expect.element('#legacy-all').to.be.present+ client.expect.element('#air-quality').to.be.present+ client.expect.element('#ash-plumes').to.be.present+ client.expect.element('#drought').to.be.present+ client.expect.element('#fires').to.be.present+ client.expect.element('#floods').to.be.present+ client.expect.element('#shipping').to.be.present+ client.expect.element('#dust-storms').to.be.present+ client.expect.element('#severe-storms').to.be.present+ client.expect.element('#smoke-plumes').to.be.present+ client.expect.element('#vegetation').to.be.present+ client.expect.element('#legacy-other').to.be.present},assertDefaultLayers: (client) => () => {- client.expect.elements(layerItem).count.to.equal(7);- client.expect.element('#active-Reference_Labels_15m').to.be.present;- client.expect.element('#active-Reference_Features_15m').to.be.present;- client.expect.element('#active-Coastlines_15m').to.be.present;- client.expect.element('#active-VIIRS_SNPP_CorrectedReflectance_TrueColor').to.be.present;- client.expect.element('#active-MODIS_Aqua_CorrectedReflectance_TrueColor').to.be.present;- client.expect.element('#active-MODIS_Terra_CorrectedReflectance_TrueColor').to.be.present;- client.expect.element('#active-VIIRS_NOAA20_CorrectedReflectance_TrueColor').to.be.present;- },-};+ client.expect.elements(layerItem).count.to.equal(7)+ client.expect.element('#active-Reference_Labels_15m').to.be.present+ client.expect.element('#active-Reference_Features_15m').to.be.present+ client.expect.element('#active-Coastlines_15m').to.be.present+ client.expect.element('#active-VIIRS_SNPP_CorrectedReflectance_TrueColor').to.be.present+ client.expect.element('#active-MODIS_Aqua_CorrectedReflectance_TrueColor').to.be.present+ client.expect.element('#active-MODIS_Terra_CorrectedReflectance_TrueColor').to.be.present+ client.expect.element('#active-VIIRS_NOAA20_CorrectedReflectance_TrueColor').to.be.present+ }+}diff --git a/e2e/reuseables/local-storage-check.js b/e2e/reuseables/local-storage-check.jsindex 6f0c68a33..c64b04ab0 100644--- a/e2e/reuseables/local-storage-check.js+++ b/e2e/reuseables/local-storage-check.js@@ -1,17 +1,17 @@/* eslint-disable object-shorthand */module.exports = {- localStorageEnabled: function() {- let enabled;+ localStorageEnabled: function () {+ let enabledtry {if (window.localStorage) {- const uid = new Date().toString();- window.localStorage.setItem(uid, uid);- enabled = window.localStorage.getItem(uid) === uid;- window.localStorage.removeItem(uid);+ const uid = new Date().toString()+ window.localStorage.setItem(uid, uid)+ enabled = window.localStorage.getItem(uid) === uid+ window.localStorage.removeItem(uid)}} catch (error) {- enabled = false;+ enabled = false}- return !!enabled;- },-};+ return !!enabled+ }+}diff --git a/e2e/reuseables/normalize-viewport.js b/e2e/reuseables/normalize-viewport.jsindex 8e9308133..5b266187c 100644--- a/e2e/reuseables/normalize-viewport.js+++ b/e2e/reuseables/normalize-viewport.js@@ -1,19 +1,19 @@module.exports = {- normalizeViewport(client, width, height) {- client.windowSize('current', width, height);+ normalizeViewport (client, width, height) {+ client.windowSize('current', width, height)client.execute((width, height) => ({width: width === window.innerWidth ? 0 : window.outerWidth - window.innerWidth,- height: height === window.innerHeight ? 0 : window.outerHeight - window.innerHeight,+ height: height === window.innerHeight ? 0 : window.outerHeight - window.innerHeight}),[width, height],(result) => {- const padding = result;- const newHeight = padding.height ? height + padding.height : height;- const newWidth = padding.width ? width + padding.width : width;- client.windowSize('current', newWidth, newHeight);- },- );- },-};+ const padding = result+ const newHeight = padding.height ? height + padding.height : height+ const newWidth = padding.width ? width + padding.width : width+ client.windowSize('current', newWidth, newHeight)+ }+ )+ }+}diff --git a/e2e/reuseables/querystrings.js b/e2e/reuseables/querystrings.jsindex c66f79bdd..5177da51d 100644--- a/e2e/reuseables/querystrings.js+++ b/e2e/reuseables/querystrings.js@@ -7,7 +7,6 @@ module.exports = {animationTooManyFramesGifCustomInterval: '?p=geographic&v=-52.43799794510461,-36.052394508901145,-33.34815419510461,-12.532863258901145&t=2019-06-13-T08%3A00%3A00Z&ics=true&ici=2&icd=3&as=2009-06-23-T10%3A00%3A00Z&ae=2019-07-01-T10%3A00%3A00Z&ab=on',animationGeostationary: '?v=-127.54084611130202,-31.196051270164425,-36.29880238885806,62.96630766900102&z=4&ics=true&ici=5&icd=10&as=2021-12-03-T16%3A00%3A00Z&ae=2021-12-03-T17%3A10%3A00Z&l=GOES-East_ABI_GeoColor,Coastlines_15m&lg=true&al=true&ab=on&t=2021-12-01-T20%3A10%3A00Z',-// compareswipeAndAIsActive:'?ca=true&cm=swipe&cv=51&p=geographic&l=MODIS_Terra_CorrectedReflectance_TrueColor&l1=VIIRS_SNPP_CorrectedReflectance_TrueColor(hidden),MODIS_Aqua_CorrectedReflectance_TrueColor(hidden),MODIS_Terra_CorrectedReflectance_TrueColor,Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m&t=2018-08-17-T00%3A00%3A00Z&z=3&t1=2018-08-16-T00%3A00%3A00Z&v=-127.6171875,-46.5556640625,31.7109375,53.0244140625',@@ -31,9 +30,8 @@ module.exports = {wildfiresWithDates: '?v=-139.02635001706034,25.660099233568406,-85.27770827186355,43.288373996427595&e=true&efs=false&efd=2020-01-16,2020-06-16&efc=wildfires&t=2020-06-16-T18%3A31%3A28Z',backwardsCompatibleEventUrl: '?v=-49.6224609375,13.940234375000001,-26.5775390625,37.459765625&e=EONET_1874,2005-12-31&l=IMERG_Precipitation_Rate,Reference_Labels_15m,Reference_Features_15m,MODIS_Terra_CorrectedReflectance_TrueColor&lg=true&t=2005-12-31-T00%3A00%3A00Z',-// layersmultipleDataLayers: '?p=geographic&l=MODIS_Terra_Aerosol,MODIS_Terra_Brightness_Temp_Band31_Day&t=2017-03-22&z=3&v=136.07019188386334,14.722152527011556,155.59817576644127,24.312819167567586',continuousDataLayers: '?p=geographic&l=MODIS_Terra_Brightness_Temp_Band31_Day&t=2015-05-25&z=2&v=-42.148380855752734,42.13121723408824,22.122734950093943,85.16225953076464',- referenceLayersOnly: '?l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m',-};+ referenceLayersOnly: '?l=Reference_Labels_15m(hidden),Reference_Features_15m(hidden),Coastlines_15m'+}diff --git a/e2e/reuseables/selectors.js b/e2e/reuseables/selectors.jsindex 53557520b..550f562ed 100644--- a/e2e/reuseables/selectors.js+++ b/e2e/reuseables/selectors.js@@ -100,7 +100,6 @@ module.exports = {yearUp: '.input-wrapper-year > div.date-arrows.date-arrow-up',datePickerWheel: '.datepicker-modal .datepicker-wheel',-// layerslayersModalCloseButton: '.custom-layer-dialog .modal-header .close',aerosolOpticalDepth: '#legacy-all #layer-category-item-legacy-all-aerosol-optical-depth',@@ -204,5 +203,5 @@ module.exports = {contextMenuAddMarker: '#context-menu-add-marker',contextMenuDistance: '#context-menu-measure-distance',contextMenuArea: '#context-menu-measure-area',- contentMenuChangeUnits: '#context-menu-change-units',-};+ contentMenuChangeUnits: '#context-menu-change-units'+}diff --git a/e2e/reuseables/skip-tour.js b/e2e/reuseables/skip-tour.jsindex 136fc8243..a143d2b4e 100644--- a/e2e/reuseables/skip-tour.js+++ b/e2e/reuseables/skip-tour.js@@ -1,32 +1,32 @@-const { normalizeViewport } = require('./normalize-viewport.js');+const { normalizeViewport } = require('./normalize-viewport.js')module.exports = {- loadAndSkipTour(c, wait) {- normalizeViewport(c, 1024, 768);+ loadAndSkipTour (c, wait) {+ normalizeViewport(c, 1024, 768)c.url(c.globals.url).execute(- function() {- let showModal;+ function () {+ let showModaltry {if (window.localStorage) {- showModal = !window.localStorage.getItem('hideTour');+ showModal = !window.localStorage.getItem('hideTour')}} catch (error) {// If localStorage is disabled, tour modal does not show- showModal = false;+ showModal = false}- return showModal;+ return showModal},[],- function({ value: showModal }) {+ function ({ value: showModal }) {if (showModal) {c.waitForElementVisible('.tour button.close', wait, () => {- c.click('.tour button.close');- c.pause(1000);- });+ c.click('.tour button.close')+ c.pause(1000)+ })} else {- c.waitForElementVisible('#wv-logo', wait);+ c.waitForElementVisible('#wv-logo', wait)}- },- );- },-};+ }+ )+ }+}diff --git a/e2e/reuseables/switch-projection.js b/e2e/reuseables/switch-projection.jsindex 544193d37..b15829c4e 100644--- a/e2e/reuseables/switch-projection.js+++ b/e2e/reuseables/switch-projection.js@@ -1,13 +1,13 @@-const TIME_LIMIT = 10000;+const TIME_LIMIT = 10000// proj is either 'geographic', 'arctic', or 'antarctic'module.exports = {- switchProjection(client, proj) {- const c = client;- c.click('#wv-proj-button');- c.waitForElementVisible(`#change-${proj}-button`, TIME_LIMIT);- c.pause(500);- c.click(`#change-${proj}-button`);- c.waitForElementVisible(`#wv-map-${proj}`, TIME_LIMIT);- },-};+ switchProjection (client, proj) {+ const c = client+ c.click('#wv-proj-button')+ c.waitForElementVisible(`#change-${proj}-button`, TIME_LIMIT)+ c.pause(500)+ c.click(`#change-${proj}-button`)+ c.waitForElementVisible(`#wv-map-${proj}`, TIME_LIMIT)+ }+}diff --git a/e2e/reuseables/zoom.js b/e2e/reuseables/zoom.jsindex 28957d120..eba504148 100644--- a/e2e/reuseables/zoom.js+++ b/e2e/reuseables/zoom.js@@ -1,10 +1,10 @@module.exports = {- zoomIn(c) {- c.click('button.wv-map-zoom-in');- c.pause(300);+ zoomIn (c) {+ c.click('button.wv-map-zoom-in')+ c.pause(300)},- zoomOut(c) {- c.click('button.wv-map-zoom-out');- c.pause(300);- },-};+ zoomOut (c) {+ c.click('button.wv-map-zoom-out')+ c.pause(300)+ }+}diff --git a/nightwatch.conf.js b/nightwatch.conf.jsindex 29f455e8d..555ebff65 100644--- a/nightwatch.conf.js+++ b/nightwatch.conf.js@@ -1,8 +1,8 @@-const seleniumServer = require('selenium-server-standalone-jar');-const chromedriver = require('chromedriver');-const geckodriver = require('geckodriver');+const seleniumServer = require('selenium-server-standalone-jar')+const chromedriver = require('chromedriver')+const geckodriver = require('geckodriver')-const files = './e2e/features';+const files = './e2e/features'module.exports = {output_folder: 'e2e/reports',globals_path: 'e2e/globals.js',@@ -17,24 +17,24 @@ module.exports = {'webdriver.chrome.driver': chromedriver.path,'webdriver.gecko.driver': geckodriver.path,'webdriver.firefox.profile': 'nightwatch',- 'webdriver.gecko.profile': 'nightwatch',- },+ 'webdriver.gecko.profile': 'nightwatch'+ }},test_settings: {default: {launch_url: 'http://localhost',selenium_port: 4444,selenium_host: 'localhost',- marionette: true,+ marionette: true},chrome: {desiredCapabilities: {browserName: 'chrome','goog:chromeOptions': {w3c: false,- prefs: { 'profile.managed_default_content_settings.notifications': 1 },- },- },+ prefs: { 'profile.managed_default_content_settings.notifications': 1 }+ }+ }},chromeHeadless: {desiredCapabilities: {@@ -42,9 +42,9 @@ module.exports = {'goog:chromeOptions': {w3c: false,prefs: { 'profile.managed_default_content_settings.notifications': 1 },- args: ['headless', 'no-sandbox', 'disable-gpu'],- },- },+ args: ['headless', 'no-sandbox', 'disable-gpu']+ }+ }},chromeLocalStorageDisabled: {desiredCapabilities: {@@ -52,24 +52,24 @@ module.exports = {'goog:chromeOptions': {w3c: false,prefs: { 'profile.managed_default_content_settings.notifications': 1 },- args: ['headless', 'no-sandbox', 'disable-gpu', 'disable-local-storage'],- },- },+ args: ['headless', 'no-sandbox', 'disable-gpu', 'disable-local-storage']+ }+ }},firefox: {desiredCapabilities: {browserName: 'firefox',- javascriptEnabled: true,- },+ javascriptEnabled: true+ }},firefoxHeadless: {desiredCapabilities: {browserName: 'firefox',javascriptEnabled: true,'moz:firefoxOptions': {- args: ['--headless'],- },- },+ args: ['--headless']+ }+ }},firefoxLocalStorageDisabled: {desiredCapabilities: {@@ -78,10 +78,10 @@ module.exports = {'moz:firefoxOptions': {args: ['--headless'],prefs: {- 'dom.storage.enabled': false,- },- },- },- },- },-};+ 'dom.storage.enabled': false+ }+ }+ }+ }+ }+}diff --git a/package.json b/package.jsonindex 16fa54c92..50f41ea49 100644--- a/package.json+++ b/package.json@@ -62,7 +62,7 @@"getcapabilities": "bash -c 'FETCH_GC=1 npm run build:options'","generatePreviews": "python3 tasks/python3/fetchPreviewSnapshots.py","linkcheck": "node ./tasks/linkcheck",- "lint": "run-s lint:*",+ "lint": "run-s lint:js lint:scss","lint:scss": "npx stylelint ./web/scss/**/*.scss","lint:js": "npx eslint . --quiet","preinstall": "node tasks/checkNodeVersion.js",diff --git a/rpm/README.md b/rpm/README.mddeleted file mode 100644index 2f75f2621..000000000--- a/rpm/README.md+++ /dev/null@@ -1,39 +0,0 @@-# RPM build / CentOS 6--This RPM build is specific to the Worldview production system and is not-meant to be used for other purposes.--A Dockerfile was created to test the build but this ran into problems-when using `npm install` on macOS:--https://github.com/docker/for-mac/issues/2296--Testing is now best done on a virtual machine. Use the commands in the-Dockerfile to setup the VM.--One of the node.js modules requires a C+11 compiler. Install the-developer toolset below:--https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/--Test the RPM build with the following:--```-scl enable devtoolset-6 bash-npm run distclean-npm install-npm run dist-rpm/buildRPM.js-```--RPM will be found in the `dist` directory.--## Bamboo--The RPM is generated by Bamboo by running the `tasks/buildAll.sh` script.-Bamboo also clones a separate repository that contains the `bitly.json`-configuration and places it in the repository root.----diff --git a/rpm/bitly.json b/rpm/bitly.jsondeleted file mode 100644index 3eba706db..000000000--- a/rpm/bitly.json+++ /dev/null@@ -1,4 +0,0 @@-{- "login": "",- "key": ""-}\ No newline at end of filediff --git a/rpm/buildRPM.js b/rpm/buildRPM.jsdeleted file mode 100755index d94a37eb9..000000000--- a/rpm/buildRPM.js+++ /dev/null@@ -1,27 +0,0 @@-#!/usr/bin/env node--const shell = require('shelljs');-const moment = require('moment');-const homedir = require('os').homedir();-const pkg = require('../package.json');--const buildNumber = moment.utc().format('YYMMDDHHmmss');--console.log('Preparing RPM build');-shell.rm('-rf', `${homedir}/rpmbuild`);-shell.mkdir('-p', `${homedir}/rpmbuild/SOURCES`);-shell.cp('dist/worldview.tar.gz', `${homedir}/rpmbuild/SOURCES`);-shell.cp('rpm/httpd.conf', `${homedir}/rpmbuild/SOURCES`);-shell.cp('rpm/bitly.json', `${homedir}/rpmbuild/SOURCES`);-shell.mkdir('-p', `${homedir}/rpmbuild/SPECS`);-shell.cp('rpm/worldview.spec', `${homedir}/rpmbuild/SPECS`);--console.log('Branding');-const applyTo = `${homedir}/rpmbuild/SPECS/worldview.spec`;-shell.sed('-i', /@WORLDVIEW@/g, 'worldview', applyTo);-shell.sed('-i', /@BUILD_VERSION@/g, pkg.version, applyTo);-shell.sed('-i', /@BUILD_NUMBER@/g, buildNumber, applyTo);--console.log('Building RPM');-shell.exec(`rpmbuild -ba ${homedir}/rpmbuild/SPECS/worldview.spec`);-shell.cp(`${homedir}/rpmbuild/RPMS/noarch/*`, 'dist');diff --git a/rpm/httpd.conf b/rpm/httpd.confdeleted file mode 100644index 68d1f4788..000000000--- a/rpm/httpd.conf+++ /dev/null@@ -1,17 +0,0 @@-Alias /worldview /usr/share/worldview/web--AddHandler cgi-script .cgi--<Directory /usr/share/worldview/web>- Require all granted-</Directory>--AddHandler cgi-script .cgi--<Directory /usr/share/worldview/web/service>- Options ExecCGI-</Directory>--<Directory /usr/share/worldview/web/config>- Header set Access-Control-Allow-Origin "*"-</Directory>diff --git a/rpm/worldview.spec b/rpm/worldview.specdeleted file mode 100644index b4ee9e08c..000000000--- a/rpm/worldview.spec+++ /dev/null@@ -1,69 +0,0 @@-Name: worldview-Version: @BUILD_VERSION@-Release: 1.@BUILD_NUMBER@%{?dist}-Summary: Browse full-resolution, near real-time satellite imagery.-License: NASA-1.3-URL: http://earthdata.nasa.gov-Source0: worldview.tar.gz-Source1: httpd.conf-Source2: bitly.json-BuildArch: noarch-Requires: httpd--# Turn off the brp-python-bytecompile script-%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')--# Set httpd configuration-%global httpdconfdir %{_sysconfdir}/httpd/conf.d--%description-%{summary}--%package debug-Summary: Non-minified version of Worldview for debugging--%description debug-%{summary}--%prep-%setup -c -T-tar xf %{SOURCE0} --touch-cp %{SOURCE1} .-cp %{SOURCE2} .--%install-rm -rf %{buildroot}--# Install Apache configuration for release-install -m 755 -d %{buildroot}/%{httpdconfdir}-install -m 644 httpd.conf %{buildroot}/%{httpdconfdir}/@[email protected]-rm httpd.conf--# Install release application-install -m 755 -d %{buildroot}/%{_datadir}/@WORLDVIEW@/web-cp -r @WORLDVIEW@/* %{buildroot}/%{_datadir}/@WORLDVIEW@/web--# Keep the bitly API key outside the web root-cp bitly.json %{buildroot}/%{_datadir}/@WORLDVIEW@--%clean-rm -rf %{buildroot}--%files-%defattr(-,root,root,-)-%{_datadir}/@WORLDVIEW@-%config(noreplace) %{httpdconfdir}/@[email protected]--%post-if [ $1 -gt 0 ] ; then- if /bin/systemctl show httpd.service | grep ActiveState=active >/dev/null ; then- /bin/systemctl reload httpd.service- fi-fi--%postun-if [ $1 -eq 0 ] ; then- if /bin/systemctl show httpd.service | grep ActiveState=active >/dev/null ; then- /bin/systemctl reload httpd.service- fi-fidiff --git a/tasks/.eslintrc b/tasks/.eslintrcdeleted file mode 100644index fac57a149..000000000--- a/tasks/.eslintrc+++ /dev/null@@ -1,23 +0,0 @@-{- "extends": ["standard", "plugin:n/recommended"],- "rules": {- "new-cap": ["error", {}],- "camelcase": ["error", {- "ignoreDestructuring": true,- "properties": "never"- }],- "n/no-path-concat": "warn",- "n/no-deprecated-api": "warn",- "no-async-promise-executor": "warn"- },- "overrides": [- {- "files": ["*.js"],- "rules": {- "no-undef": "off",- "n/no-unpublished-require": "off",- "no-unused-expressions": "off"- }- }- ]-}diff --git a/tasks/buildOptions.sh b/tasks/buildOptions.shindex a80ae1028..5ca64046a 100755--- a/tasks/buildOptions.sh+++ b/tasks/buildOptions.sh@@ -52,7 +52,7 @@ mkdir -p "$BUILD_DIR/colormaps"if [ "$FETCH_GC" ] ; thenrm -rf "$OPT_DIR/$OPT_SUBDIR/gc/*"rm -rf "$OPT_DIR/$OPT_SUBDIR/colormaps/gc/*"- `$NODE_SCRIPTS_DIR/getCapabilities.js --config "$OPT_DIR/$OPT_SUBDIR/config.json" --getcapabilities "$OPT_DIR/$OPT_SUBDIR/gc"`+ `node $NODE_SCRIPTS_DIR/getCapabilities.js --config "$OPT_DIR/$OPT_SUBDIR/config.json" --getcapabilities "$OPT_DIR/$OPT_SUBDIR/gc"`# Get visualization metadata (if configured)# rm -rf "$OPT_DIR/$OPT_SUBDIR/layer-metadata"diff --git a/tasks/linkCheck.js b/tasks/linkCheck.jsindex 4982c43d4..d9c6c1608 100755--- a/tasks/linkCheck.js+++ b/tasks/linkCheck.js@@ -32,6 +32,7 @@ const organizeURLStatus = async (scrapedUrls) => {const fileName = `./tasks/link-check/results/WV-link-check-${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}.json`fs.writeFile(fileName, stringified, 'utf8', () => {makeLine(`Results file created: ${fileName}`)+ // eslint-disable-next-line n/no-process-exitprocess.exit()})}diff --git a/tasks/node/getCapabilities.js b/tasks/node/getCapabilities.jsindex ce4837601..93a355e11 100755--- a/tasks/node/getCapabilities.js+++ b/tasks/node/getCapabilities.js@@ -140,8 +140,7 @@ async function processGetCapabilities (outputFile) {try {if (!gc.Capabilities || !gc.Capabilities.Contents) {- console.error(`error: ${outputFile}: no layers`)- process.exit(1)+ throw new Error(`error: ${outputFile}: no layers`)}const layers = gc.Capabilities.Contents.Layer@@ -151,8 +150,7 @@ async function processGetCapabilities (outputFile) {processVectorData(layer)})} catch (error) {- console.error(`ERROR: ${outputFile}: ${error}`)- process.exit(1)+ throw new Error(`ERROR: ${outputFile}: ${error}`)}}diff --git a/tasks/upload.js b/tasks/upload.jsindex 6b56477d7..2fc1d7e25 100755--- a/tasks/upload.js+++ b/tasks/upload.js@@ -1,4 +1,3 @@-#!/usr/bin/env nodeconst fs = require('fs')const os = require('os')@@ -11,8 +10,7 @@ const ssh = new NodeSSH()function error (msg) {const prog = path.basename(__filename)- console.error(`${prog}: error: ${msg}`)- process.exit(1)+ throw new Error(`${prog}: error: ${msg}`)}const { argv } = yargs@@ -63,7 +61,6 @@ appear on the command line.`)if (argv.help) {yargs.showHelp()- process.exit(0)}const baseDir = path.join(__dirname, '..')diff --git a/web/.eslintrc b/web/.eslintrcnew file mode 100644index 000000000..a61750b72--- /dev/null+++ b/web/.eslintrc@@ -0,0 +1,165 @@+{+ "root": true,+ "env": {+ "browser": true,+ "node": true,+ "jest/globals": true+ },+ "parserOptions": {+ "ecmaVersion": "latest",+ "sourceType": "module",+ "ecmaFeatures": {+ "jsx": true+ }+ },+ "plugins": [+ "react",+ "jest",+ "no-storage"+ ],+ "extends": "airbnb",+ "parser": "@babel/eslint-parser",+ "settings": {+ "react": {+ "version": "detect"+ },+ "import/resolver": {+ "node": {}, // Needed for node core modules (https://github.com/benmosher/eslint-plugin-import/issues/1396)+ "webpack": {}+ }+ },+ "rules": {+ // The following rules are cases where our base rules+ // differed from AirBnB Style guide. Keeping for now.+ "no-unused-vars": [+ "error",+ {+ "vars": "all",+ "args": "none"+ }+ ],+ "camelcase": [+ "error",+ {+ "allow": [+ "^UNSAFE_"+ ],+ "properties": "never"+ }+ ],+ "no-useless-call": "error",+ "no-extra-parens": "error",+ "space-before-function-paren": "off",+ "import/extensions": "off",+ "no-multiple-empty-lines": "off",+ "import/no-extraneous-dependencies": [+ "error",+ {+ "devDependencies": [+ "**/*test.js",+ "**/*config.js",+ "**/*conf.js"+ ]+ }+ ],+ "no-storage/no-browser-storage": "error"+ },+ "overrides": [+ {+ "files": [+ "**/*.js"+ ],+ "rules": {+ /* BEGIN Airbnb overrides++ Rules below are overriding the Airbnb style guide rules in order to get code+ to pass without having to fix hundreds of existing errors by hand.++ For rules set to "off": consider setting to "warn" to identify non-compliance in new code+ For rules set to "warn": consider removing to throw errors on existing and future code+ */+ // Base rule overrides+ "no-nested-ternary": "off", // 58 errors+ "no-shadow": "warn", // 136 errors+ "max-len": "off",+ "consistent-return": "off", // 73 errors+ "no-underscore-dangle": "off",+ "func-names": "off",+ "no-param-reassign": [ // 329 errors+ "warn",+ {+ "props": false+ }+ ],+ "no-use-before-define": [+ "error",+ {+ "functions": false,+ "classes": true,+ "variables": false+ }+ ],+ // Import rules overrides+ "import/no-cycle": "warn",+ // Accesibility rules overrides+ "jsx-a11y/no-noninteractive-tabindex": "off",+ "jsx-a11y/no-noninteractive-element-interactions": "off",+ "jsx-a11y/anchor-has-content": "off",+ "jsx-a11y/control-has-associated-label": "off",+ "jsx-a11y/anchor-is-valid": "off",+ "jsx-a11y/label-has-associated-control": "off",+ "jsx-a11y/alt-text": "off",+ "jsx-a11y/mouse-events-have-key-events": "off",+ "jsx-a11y/tabindex-no-positive": "off",+ "jsx-a11y/no-static-element-interactions": "off",+ "jsx-a11y/click-events-have-key-events": "off",+ // React rules overrides+ "react/jsx-props-no-spreading": "warn", // 17 errors+ "react/jsx-filename-extension": "off",+ "react/jsx-no-bind": "warn",+ "react/sort-comp": [+ "error",+ {+ "order": [+ "static-methods",+ "lifecycle",+ "everything-else",+ "render"+ ],+ "groups": {+ "lifecycle": [+ "displayName",+ "propTypes",+ "contextTypes",+ "childContextTypes",+ "mixins",+ "statics",+ "defaultProps",+ "constructor",+ "getDefaultProps",+ "state",+ "getInitialState",+ "getChildContext",+ "getDerivedStateFromProps",+ "componentWillMount",+ "UNSAFE_componentWillMount",+ "componentDidMount",+ "componentWillReceiveProps",+ "UNSAFE_componentWillReceiveProps",+ "shouldComponentUpdate",+ "componentWillUpdate",+ "UNSAFE_componentWillUpdate",+ "getSnapshotBeforeUpdate",+ "componentDidUpdate",+ "componentDidCatch",+ "componentWillUnmount"+ ]+ }+ }+ ],+ "react/forbid-prop-types": "off", // 216 errors+ "react/require-default-props": "off" // 965 errors+ }+ }+ ]+}diff --git a/web/.htaccess b/web/.htaccessdeleted file mode 100644index 481ccc9ac..000000000--- a/web/.htaccess+++ /dev/null@@ -1,18 +0,0 @@-ExpiresActive On-<FilesMatch index.html>- ExpiresDefault A0- Header set Cache-Control "no-cache, no-store, must-revalidate"- Header set Pragma "no-cache"-</FilesMatch>--AddOutputFilterByType DEFLATE text/html-AddOutputFilterByType DEFLATE text/css-AddOutputFilterByType DEFLATE text/javascript-AddOutputFilterByType DEFLATE application/javascript-AddOutputFilterByType DEFLATE application/json--AddType application/vnd.ms-fontobject .eot-AddType application/font-woff .woff-AddType application/x-font-truetype .ttf-AddType image/svg+xml .svg-AddType application/x-font-opentype .otfdiff --git a/web/js/.htaccess b/web/js/.htaccessdeleted file mode 100644index aa4902dec..000000000--- a/web/js/.htaccess+++ /dev/null@@ -1,9 +0,0 @@-ExpiresActive On-ExpiresDefault A0-Header set Cache-Control "no-cache, must-revalidate, public"-Header set Pragma "no-cache"-----diff --git a/web/pages/.htaccess b/web/pages/.htaccessdeleted file mode 100644index aa4902dec..000000000--- a/web/pages/.htaccess+++ /dev/null@@ -1,9 +0,0 @@-ExpiresActive On-ExpiresDefault A0-Header set Cache-Control "no-cache, must-revalidate, public"-Header set Pragma "no-cache"-----diff --git a/webpack.config.js b/webpack.config.jsindex cf471e56f..e62e35535 100644--- a/webpack.config.js+++ b/webpack.config.js@@ -8,52 +8,52 @@ const MomentLocalesPlugin = require('moment-locales-webpack-plugin');const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');const CssUrlRelativePlugin = require('css-url-relative-plugin');-const devMode = process.env.NODE_ENV !== 'production';+const devMode = process.env.NODE_ENV !== 'production'const pluginSystem = [new MomentLocalesPlugin(),new CssUrlRelativePlugin(),new MiniCssExtractPlugin({- filename: 'wv.css',- }),-];+ filename: 'wv.css'+ })+]/* Conditional Plugin Management */if (devMode) {pluginSystem.push(- new ReactRefreshWebpackPlugin(),- );+ new ReactRefreshWebpackPlugin()+ )}if (process.env.ANALYZE_MODE === 'true') {- pluginSystem.push(new BundleAnalyzerPlugin());+ pluginSystem.push(new BundleAnalyzerPlugin())}if (process.env.DEBUG !== undefined) {pluginSystem.push(- new webpack.DefinePlugin({ DEBUG: JSON.stringify(process.env.DEBUG) }),- );+ new webpack.DefinePlugin({ DEBUG: JSON.stringify(process.env.DEBUG) })+ )} else {pluginSystem.push(- new webpack.DefinePlugin({ DEBUG: false }),- );+ new webpack.DefinePlugin({ DEBUG: false })+ )}const babelLoaderExcludes = [/\.test\.js$/,/fixtures\.js$/,- /core-js/,-];+ /core-js/+]// Inlucde any modules that need to be transpiled by babel-loaderconst transpileDependencies = [- 'react-visibility-sensor',-];+ 'react-visibility-sensor'+]if (devMode) {// Don't transpile any dependencies in /node_modules except those found// in transpileDependencies arraybabelLoaderExcludes.push(- new RegExp(`node_modules(?!(/|\\\\)(${transpileDependencies.join('|')})).*`),- );+ new RegExp(`node_modules(?!(/|\\\\)(${transpileDependencies.join('|')})).*`)+ )}module.exports = {@@ -64,29 +64,29 @@ module.exports = {path: path.resolve(__dirname, 'web/build/'),publicPath: './',pathinfo: false,- clean: true,+ clean: true},devtool: devMode && 'source-map',devServer: {devMiddleware: {- writeToDisk: true,+ writeToDisk: true},static: path.join(__dirname, 'web'),compress: true,port: 3000,hot: true,- historyApiFallback: true,+ historyApiFallback: true},optimization: {minimizer: [new TerserPlugin({terserOptions: {ecma: 5,- toplevel: true,- },+ toplevel: true+ }}),- new CssMinimizerPlugin(),- ],+ new CssMinimizerPlugin()+ ]},plugins: pluginSystem,module: {@@ -98,23 +98,23 @@ module.exports = {options: {compact: false, // fixes https://stackoverflow.com/questions/29576341/what-does-the-code-generator-has-deoptimised-the-styling-of-some-file-as-it-ecacheDirectory: devMode,- plugins: [devMode && require.resolve('react-refresh/babel')].filter(Boolean),- },+ plugins: [devMode && require.resolve('react-refresh/babel')].filter(Boolean)+ }},- exclude: babelLoaderExcludes,+ exclude: babelLoaderExcludes},{test: /\.(sa|sc|c)ss$/,use: [{- loader: MiniCssExtractPlugin.loader,+ loader: MiniCssExtractPlugin.loader},{loader: 'css-loader',options: {sourceMap: true,- importLoaders: 1,- },+ importLoaders: 1+ }},{loader: 'postcss-loader',@@ -122,50 +122,50 @@ module.exports = {postcssOptions: {plugins: ['cssnano',- 'autoprefixer',- ],- },- },+ 'autoprefixer'+ ]+ }+ }},{loader: 'sass-loader',options: {- sourceMap: true,- },- },- ],+ sourceMap: true+ }+ }+ ]},{test: /\.(png|svg|jpg|jpeg|gif)$/i,type: 'asset/resource',generator: {- filename: 'images/[name][ext][query]',- },+ filename: 'images/[name][ext][query]'+ }},{test: /\.(woff|woff2|eot|ttf|otf)$/i,type: 'asset/resource',generator: {- filename: 'fonts/[name][ext][query]',- },- },- ],+ filename: 'fonts/[name][ext][query]'+ }+ }+ ]},resolve: {alias: {googleTagManager$: path.resolve(__dirname,- './web/js/components/util/google-tag-manager.js',- ),+ './web/js/components/util/google-tag-manager.js'+ )},fallback: {- fs: false,- },+ fs: false+ }},stats: {// reduce output text on build - remove for more verbosechunks: false,modules: false,- children: false,- },-};+ children: false+ }+}