Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Fix firefox tests and reports

Josiah Sprague0254d9618683
diff --git a/e2e/create-html-report.js b/e2e/create-html-report.js
deleted file mode 100644
index 97d110df6..000000000
--- a/e2e/create-html-report.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var reporter = require('cucumber-html-reporter');
-
-var options = {
- name: 'Worldview e2e Tests',
- theme: 'bootstrap',
- jsonFile: 'e2e/reports/cucumber.json',
- output: 'e2e/reports/cucumber.html',
- reportSuiteAsScenarios: true,
- launchReport: true
-};
-
-reporter.generate(options);
diff --git a/e2e/create-report.js b/e2e/create-report.js
new file mode 100644
index 000000000..3e9f1f02f
--- /dev/null
+++ b/e2e/create-report.js
@@ -0,0 +1,12 @@
+var reporter = require('cucumber-html-reporter');
+var browser = process.argv[2];
+var Browser = browser.charAt(0).toUpperCase() + browser.substring(1);
+
+reporter.generate({
+ name: 'Worldview Tests: ' + Browser,
+ theme: 'bootstrap',
+ jsonFile: 'e2e/reports/cucumber-'+ browser +'.json',
+ output: 'e2e/reports/cucumber-'+ browser +'.html',
+ reportSuiteAsScenarios: true,
+ launchReport: true
+});
diff --git a/nightwatch.conf.js b/nightwatch.conf.js
index 836ae529d..657853bf0 100644
--- a/nightwatch.conf.js
+++ b/nightwatch.conf.js
@@ -6,14 +6,14 @@ require('nightwatch-cucumber')({
cucumberArgs: [
'--compiler', 'js:babel-core/register',
'--require', 'e2e/step_definitions',
- '--format', 'json:e2e/reports/cucumber.json',
+ '--format', `json:e2e/reports/cucumber-${process.argv[3]}.json`,
'e2e/features'
]
});
module.exports = {
- output_folder: './e2e/reports',
- globals_path: './e2e/globals.js',
+ output_folder: 'e2e/reports',
+ globals_path: 'e2e/globals.js',
live_output: false,
selenium: {
start_process: true,
@@ -37,6 +37,11 @@ module.exports = {
marionette: true
}
},
+ chrome: {
+ desiredCapabilities: {
+ browserName: 'chrome'
+ }
+ },
firefox: {
desiredCapabilities: {
browserName: 'firefox'
diff --git a/package.json b/package.json
index 261c0fea2..79c81dce5 100644
--- a/package.json
+++ b/package.json
@@ -13,13 +13,16 @@
"node": "6.8.1"
},
"scripts": {
- "test": "grunt test lint",
- "e2e-test": "run-s --continue-on-error e2e:*",
- "e2e:chrome": "nightwatch -e default",
- "e2e:firefox": "nightwatch -e firefox --skiptags hover",
- "e2e:report": "node e2e/create-html-report.js",
+ "preinstall": "node version-check.js",
"start": "node ./bin/www",
- "preinstall": "node version-check.js"
+ "test": "grunt test lint",
+ "e2e": "run-s --continue-on-error e2e:*",
+ "e2e:chrome": "run-s --continue-on-error e2e:chrome:*",
+ "e2e:chrome:test": "nightwatch -e chrome",
+ "e2e:chrome:report": "node e2e/create-report.js chrome",
+ "e2e:firefox": "run-s --continue-on-error e2e:firefox:*",
+ "e2e:firefox:test": "nightwatch -e firefox --skiptags hover",
+ "e2e:firefox:report": "node e2e/create-report.js firefox"
},
"devDependencies": {
"autoprefixer": "7.1.1",