Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix remaining e2e lint errors

Jason Kentcf31130a4abb
diff --git a/e2e/browserstack.conf.js b/e2e/browserstack.conf.js
index ba00407b4..02e0a171e 100644
--- a/e2e/browserstack.conf.js
+++ b/e2e/browserstack.conf.js
@@ -78,13 +78,15 @@ environments.forEach((e) => {
});
// Merge common_capabilities with each test_settings key
-for (const i in nightwatchConfig.test_settings) {
- const config = nightwatchConfig.test_settings[i];
+Object.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 || {};
- for (const j in nightwatchConfig.common_capabilities) {
- config.desiredCapabilities[j] = config.desiredCapabilities[j] || nightwatchConfig.common_capabilities[j];
- }
-}
+ const capabilityKeys = Object.keys(nightwatchConfig.common_capabilities);
+ capabilityKeys.forEach((capabilityKey) => {
+ config.desiredCapabilities[capabilityKey] = config.desiredCapabilities[capabilityKey]
+ || nightwatchConfig.common_capabilities[capabilityKey];
+ });
+});
module.exports = nightwatchConfig;
diff --git a/e2e/custom-assertions/urlParameterEquals.js b/e2e/custom-assertions/urlParameterEquals.js
index 96471a6e7..3055c2d82 100644
--- a/e2e/custom-assertions/urlParameterEquals.js
+++ b/e2e/custom-assertions/urlParameterEquals.js
@@ -1,3 +1,4 @@
+// eslint-disable-next-line no-redeclare
const { URL } = require('url');
exports.assertion = function(parameter, value) {
diff --git a/e2e/features/tour/tour-test.js b/e2e/features/tour/tour-test.js
index f26905814..af3be368a 100644
--- a/e2e/features/tour/tour-test.js
+++ b/e2e/features/tour/tour-test.js
@@ -13,7 +13,7 @@ module.exports = {
client.waitForElementVisible('.tour-start', TIME_LIMIT, () => {
client.click('.tour-box:first-child');
client.waitForElementVisible('.tour-in-progress .step-total', 2000, () => {
- client.getText('.tour-in-progress .step-total', (result) => { totalSteps = parseInt(result.value); })
+ client.getText('.tour-in-progress .step-total', (result) => { totalSteps = parseInt(result.value, 10); })
.perform(() => {
for (let i = 0; i < totalSteps; i++) {
client.pause(500);
diff --git a/e2e/reuseables/click-patch-wip.js b/e2e/reuseables/click-patch-wip.js
index 72e51a827..0887514b4 100644
--- a/e2e/reuseables/click-patch-wip.js
+++ b/e2e/reuseables/click-patch-wip.js
@@ -37,15 +37,17 @@ module.exports = {
}
function extend(destination, source) {
- for (const property in source) { destination[property] = source[property]; }
+ Object.keys(source).forEach((property) => {
+ destination[property] = source[property];
+ });
return destination;
}
- var eventMatchers = {
+ const eventMatchers = {
HTMLEvents: /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
MouseEvents: /^(?:click|dblclick|mouse(?:down|up|over|move|out))$/,
};
- var defaultOptions = {
+ const defaultOptions = {
pointerX: 0,
pointerY: 0,
button: 0,