Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

linting for e2e tests #930

Benjamin Kingbc1e06e1ab5f
diff --git a/e2e/.eslintrc b/e2e/.eslintrc
new file mode 100644
index 000000000..10ea87eba
--- /dev/null
+++ b/e2e/.eslintrc
@@ -0,0 +1,59 @@
+{
+ "env": {
+ "browser": true,
+ "node": true
+ },
+ "parserOptions": {
+ "ecmaVersion": 5,
+ "sourceType": "module",
+ "ecmaFeatures": {
+ "jsx": false
+ }
+ },
+ "extends": "standard",
+ "rules": {
+ "semi": ["error", "always"],
+ "space-before-function-paren": "off",
+ "object-curly-spacing": ["warn", "always"],
+ },
+ "overrides": [
+ {
+ "files": [ "*.js"],
+ "rules": {
+ "no-octal": "warn",
+ "no-unused-vars": "warn",
+ "no-undef": "warn",
+ "no-useless-escape": "warn",
+ "eqeqeq": "warn",
+ "padded-blocks": "warn",
+ "space-before-blocks": "warn",
+ "spaced-comment": "warn",
+ "no-multiple-empty-lines": "warn",
+ "operator-linebreak": "warn",
+ "comma-dangle": "warn",
+ "no-use-before-define": "warn",
+ "camelcase": "warn",
+ "no-extend-native": "warn",
+ "one-var": "warn",
+ "no-extra-parens": "warn",
+ "space-in-parens": "warn",
+ "space-infix-ops": "warn",
+ "no-multi-spaces": "warn",
+ "comma-spacing": "warn",
+ "yoda": "warn",
+ "no-useless-return": "warn",
+ "keyword-spacing": "warn",
+ "brace-style": "warn",
+ "func-call-spacing": "warn",
+ "no-return-assign": "warn",
+ "no-sequences": "warn",
+ "no-unused-expressions": "false",
+ "no-useless-call": "warn",
+ "no-trailing-spaces": "warn",
+ "standard/computed-property-even-spacing": "warn",
+ "wrap-iife": "warn",
+ "new-cap": "warn"
+ }
+ }
+ ]
+}
diff --git a/e2e/features/animations/animation-test.js b/e2e/features/animations/animation-test.js
index ab144eb3d..52e4a2838 100644
--- a/e2e/features/animations/animation-test.js
+++ b/e2e/features/animations/animation-test.js
@@ -24,7 +24,7 @@ module.exports = {
// Test Permalink opens widget
client.waitForElementVisible('#day-animation-widget-start', TIME_LIMIT, function(el) {
client.getValue('#day-animation-widget-start', function(result) {
- startDay = result.value;
+ const startDay = result.value;
client.useCss()
.moveToElement('#wv-timeline-range-selector > g:nth-child(2) > rect', 1, 1)
.mouseButtonDown(0)
@@ -32,7 +32,7 @@ module.exports = {
.mouseButtonUp(0)
.pause(2000);
client.getValue('#day-animation-widget-start', function(result) {
- newDay = result.value;
+ const newDay = result.value;
this.assert.notEqual(startDay, newDay);
});
});
@@ -50,7 +50,7 @@ module.exports = {
.moveToElement(globalSelectors.resolutionTooltip, 1, 1)
.click(globalSelectors.yearlyResolutionTooltip);
client.pause(1000);
- client.expect.element(globalSelectors.timelineSetToYears).to.be.present;
+ client.expect.element(globalSelectors.timelineSetToYears).to.be.present;
});
},
after: function(client) {
diff --git a/e2e/features/layers/permalinks.js b/e2e/features/layers/permalinks.js
new file mode 100644
index 000000000..6c7cdc89c
--- /dev/null
+++ b/e2e/features/layers/permalinks.js
@@ -0,0 +1,4 @@
+module.exports = {
+ multipleDataLayers: '?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'
+};