From e587e9cd57127dfea7a319cbbec52360b2f17fd8 Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Mon, 18 Dec 2017 11:39:59 +0100 Subject: [PATCH] allow specifying the browser in selenium --- TestSelenium.js | 4 +++- www/common/sframe-app-framework.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/TestSelenium.js b/TestSelenium.js index 71de38d5c..59bdd427a 100644 --- a/TestSelenium.js +++ b/TestSelenium.js @@ -20,7 +20,9 @@ if (process.env.SAUCE_USERNAME !== undefined) { "accessKey": process.env.SAUCE_ACCESS_KEY, }).forBrowser(browserArray[0], browserArray[1], browserArray[2]).build(); } else { - driver = new WebDriver.Builder().withCapabilities({ browserName: "chrome" }).build(); + driver = new WebDriver.Builder().withCapabilities({ + browserName: process.env.BROWSER || "chrome" + }).build(); } var SC_GET_DATA = "return (window.__CRYPTPAD_TEST__) ? window.__CRYPTPAD_TEST__.getData() : '[]'"; diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index 2290dd3ba..88a8a36bd 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -291,11 +291,11 @@ define([ common.openTemplatePicker(); } - if (Test.testing) { + Test(function () { cpNfInner.chainpad.onSettle(function () { Test.passed(); }); - } + }); }; var onConnectionChange = function (info) { stateChange(info.state ? STATE.INITIALIZING : STATE.DISCONNECTED);