aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e/func.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-06-01 02:09:24 +0800
committerDan <danjm.com@gmail.com>2018-06-01 02:09:24 +0800
commit701611e317d120d2c0530e4794bd498a74e233b2 (patch)
tree4ec098d593de7ff5fe20907a48c56061cc14de54 /test/e2e/func.js
parent1bde2892ec222cec1ba3265d50ed59f665afbf83 (diff)
parent2ca084b0557242b34733107701a14ba0724363b3 (diff)
downloadtangerine-wallet-browser-701611e317d120d2c0530e4794bd498a74e233b2.tar
tangerine-wallet-browser-701611e317d120d2c0530e4794bd498a74e233b2.tar.gz
tangerine-wallet-browser-701611e317d120d2c0530e4794bd498a74e233b2.tar.bz2
tangerine-wallet-browser-701611e317d120d2c0530e4794bd498a74e233b2.tar.lz
tangerine-wallet-browser-701611e317d120d2c0530e4794bd498a74e233b2.tar.xz
tangerine-wallet-browser-701611e317d120d2c0530e4794bd498a74e233b2.tar.zst
tangerine-wallet-browser-701611e317d120d2c0530e4794bd498a74e233b2.zip
Merge branch 'i3725-refactor-send-component-' into i3914-fix-newui-send-gas-estimation
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
+}