From 0bd33d6f00f135abfd2acd1cc981afcfb0a2f0a3 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Sat, 04 May 2019 13:08:27 +0000
Subject: [PATCH] Switch to Nightwatch.js for browser tests

---
 nightwatch.conf.js |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/nightwatch.conf.js b/nightwatch.conf.js
new file mode 100644
index 0000000..4fef425
--- /dev/null
+++ b/nightwatch.conf.js
@@ -0,0 +1,50 @@
+var seleniumServer = require('selenium-server');
+var chromedriver = require('chromedriver');
+var geckodriver = require('geckodriver');
+
+module.exports = {
+  src_folders: ['tests'],
+  selenium: {
+    start_process: true,
+    server_path: seleniumServer.path,
+    port: 4444,
+    cli_args: {
+      'webdriver.chrome.driver': chromedriver.path,
+      'webdriver.gecko.driver': geckodriver.path,
+    },
+  },
+  test_settings: {
+    'chrome': {
+      desiredCapabilities: {
+        browserName: 'chrome',
+      },
+    },
+    'chrome-headless': {
+      desiredCapabilities: {
+        browserName: 'chrome',
+        chromeOptions: {
+          args: [
+            '--headless',
+            '--no-sandbox',
+            '--disable-gpu',
+          ],
+        },
+      },
+    },
+    'firefox': {
+      desiredCapabilities: {
+        browserName: 'firefox',
+      },
+    },
+    'firefox-headless': {
+      desiredCapabilities: {
+        browserName: 'firefox',
+        'moz:firefoxOptions': {
+          args: [
+            '--headless',
+          ],
+        },
+      },
+    },
+  },
+};

--
Gitblit v1.9.1