aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e/func.js
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-05-25 09:17:26 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-05-25 09:53:42 +0800
commit715624227a12e4fdec2634319e4a619927986958 (patch)
tree2beb0af879c4776d7254eb7e318296a766422790 /test/e2e/func.js
parentf5cefbbeda4c0ad6ad578a56e0e87d9e4171cc18 (diff)
downloadtangerine-wallet-browser-715624227a12e4fdec2634319e4a619927986958.tar
tangerine-wallet-browser-715624227a12e4fdec2634319e4a619927986958.tar.gz
tangerine-wallet-browser-715624227a12e4fdec2634319e4a619927986958.tar.bz2
tangerine-wallet-browser-715624227a12e4fdec2634319e4a619927986958.tar.lz
tangerine-wallet-browser-715624227a12e4fdec2634319e4a619927986958.tar.xz
tangerine-wallet-browser-715624227a12e4fdec2634319e4a619927986958.tar.zst
tangerine-wallet-browser-715624227a12e4fdec2634319e4a619927986958.zip
Add basic e2e tests for the new UI
Diffstat (limited to 'test/e2e/func.js')
-rw-r--r--test/e2e/func.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/e2e/func.js b/test/e2e/func.js
index 8b221ce47..9f06e7f37 100644
--- a/test/e2e/func.js
+++ b/test/e2e/func.js
@@ -1,5 +1,7 @@
require('chromedriver')
require('geckodriver')
+const fs = require('fs')
+const os = require('os')
const path = require('path')
const webdriver = require('selenium-webdriver')
const Command = require('selenium-webdriver/lib/command').Command
@@ -19,10 +21,15 @@ function delay (time) {
}
function buildChromeWebDriver (extPath) {
+ const tmpProfile = path.join(os.tmpdir(), fs.mkdtempSync('mm-chrome-profile'));
return new webdriver.Builder()
.withCapabilities({
chromeOptions: {
- args: [`load-extension=${extPath}`],
+ args: [
+ `load-extension=${extPath}`,
+ `user-data-dir=${tmpProfile}`,
+ ],
+ binary: process.env.SELENIUM_CHROME_BINARY,
},
})
.build()
@@ -53,4 +60,4 @@ async function installWebExt (driver, extension) {
.defineCommand(cmd.getName(), 'POST', '/session/:sessionId/moz/addon/install')
return await driver.schedule(cmd, 'installWebExt(' + extension + ')')
-} \ No newline at end of file
+}