Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix lint errors

Benjamin King22a3f81be364
diff --git a/e2e/features/image-download/resolutions3413-test.js b/e2e/features/image-download/resolutions3413-test.js
index 57547889b..14441ded4 100644
--- a/e2e/features/image-download/resolutions3413-test.js
+++ b/e2e/features/image-download/resolutions3413-test.js
@@ -22,7 +22,7 @@ module.exports = {
},
'In the arctic, top zoom levels is 5km': function (c) {
- normalizeViewport(c, 1024, 768)
+ normalizeViewport(c, 1024, 768);
bookmark(c, startParams);
openImageDownloadPanel(c);
c.expect.element('#wv-image-resolution option[value="20"]')
diff --git a/e2e/features/image-download/resolutions4326-test.js b/e2e/features/image-download/resolutions4326-test.js
index facfb4cbc..37dc57def 100644
--- a/e2e/features/image-download/resolutions4326-test.js
+++ b/e2e/features/image-download/resolutions4326-test.js
@@ -21,7 +21,7 @@ module.exports = {
},
'In geographic, top two zoom levels are 10km': function (c) {
- normalizeViewport(c, 1024, 768)
+ normalizeViewport(c, 1024, 768);
bookmark(c, startParams);
openImageDownloadPanel(c);
c.expect.element('#wv-image-resolution option[value="40"]').to.be.selected;
diff --git a/e2e/features/measure/measure-test.js b/e2e/features/measure/measure-test.js
index 56e5f1eee..1e4767b14 100644
--- a/e2e/features/measure/measure-test.js
+++ b/e2e/features/measure/measure-test.js
@@ -53,10 +53,10 @@ module.exports = {
client.waitForElementVisible(measureMenu, TIME_LIMIT, (el) => {
client.useCss().click(measureDistanceBtn);
client.pause(300);
- client.waitForElementVisible('.wv-alert', TIME_LIMIT)
+ client.waitForElementVisible('.wv-alert', TIME_LIMIT);
client.moveToElement('#wv-map-geographic', 300, 100)
.mouseButtonClick(0);
- client.pause(300)
+ client.pause(300);
client.moveToElement('#wv-map-geographic', 250, 100)
.mouseButtonClick(0)
.mouseButtonClick(0)
@@ -83,14 +83,12 @@ module.exports = {
},
'Toggling unit of measure updates the measurement value': async function (client) {
if (client.options.desiredCapabilities.browserName !== 'firefox') { // client.elements() returns different values for firefox
-
client.click(measureBtn);
await client.waitForElementVisible(measureMenu, TIME_LIMIT);
await client.click(unitOfMeasureToggle);
const tooltips = await client.elements('css selector', measurementTooltip);
tooltips.value.forEach((element) => {
client.elementIdText(element.ELEMENT, (elResult) => {
-
const pass = elResult.value.includes('mi');
client.assert.ok(pass);
});
@@ -99,7 +97,6 @@ module.exports = {
},
'Toggling great circle changes the measurement value': async function (client) {
if (client.options.desiredCapabilities.browserName !== 'firefox') { // client.elements() returns different values for firefox
-
const measureTooltips = await client.elements('css selector', measurementTooltip);
const elPromises = measureTooltips.value.map(el => client.elementIdText(el.ELEMENT, res => res.value));
const initMeasureValues = await Promise.all(elPromises).then(elem => elem.map(el => el.value));
@@ -115,7 +112,6 @@ module.exports = {
},
'Clearing a measurements removes all tooltips': function (client) {
if (client.options.desiredCapabilities.browserName !== 'firefox') { // client.elements() returns different values for firefox
-
client.waitForElementVisible(measureMenu, TIME_LIMIT, (el) => {
client.useCss().click(clearMeasurementsBtn);
client.expect.elements(measurementTooltip).count.to.equal(0);
diff --git a/e2e/reuseables/click-patch-wip.js b/e2e/reuseables/click-patch-wip.js
index 21ec962e8..ac67e5719 100644
--- a/e2e/reuseables/click-patch-wip.js
+++ b/e2e/reuseables/click-patch-wip.js
@@ -1,33 +1,30 @@
module.exports = {
customMouseEvent: function (client, selector, offsetX, offsetY, eventType) {
- eventType = eventType || "dblclick";
+ eventType = eventType || 'dblclick';
client.execute(function (obj) {
var { eventType, selector, offsetX, offsetY } = obj;
var el = document.querySelector(selector || 'body');
function simulate(element, eventName) {
var options = extend(defaultOptions, arguments[2] || {});
- var oEvent, eventType = null;
+ var oEvent; var eventType = null;
for (var name in eventMatchers) {
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);
if (eventType == 'HTMLEvents') {
oEvent.initEvent(eventName, options.bubbles, options.cancelable);
- }
- else {
+ } 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);
}
element.dispatchEvent(oEvent);
- }
- else {
+ } else {
options.clientX = options.pointerX;
options.clientY = options.pointerY;
var evt = document.createEventObject();
@@ -38,15 +35,14 @@ module.exports = {
}
function extend(destination, source) {
- for (var property in source)
- destination[property] = source[property];
+ for (var property in source) { destination[property] = source[property]; }
return destination;
}
var eventMatchers = {
- 'HTMLEvents': /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
- 'MouseEvents': /^(?:click|dblclick|mouse(?:down|up|over|move|out))$/
- }
+ HTMLEvents: /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
+ MouseEvents: /^(?:click|dblclick|mouse(?:down|up|over|move|out))$/
+ };
var defaultOptions = {
pointerX: 0,
pointerY: 0,
@@ -57,9 +53,9 @@ module.exports = {
metaKey: false,
bubbles: true,
cancelable: true
- }
+ };
return simulate(el, eventType, { pointerX: offsetX, pointerY: offsetY });
}, [{ eventType: eventType, selector: selector, offsetX: offsetX, offsetY: offsetY }], function (result) {
- })
+ });
}
-};
\ No newline at end of file
+};