aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e/func.js
diff options
context:
space:
mode:
authortmashuang <tmashuang@gmail.com>2017-09-13 05:14:24 +0800
committertmashuang <tmashuang@gmail.com>2017-09-13 05:14:24 +0800
commita79b4db06a3f9cc76aa68049dafe2cd2caa564b4 (patch)
tree96da514a38d024b5c5f433eb4d7d0d57b97e5498 /test/e2e/func.js
parentcafebb6417331d9d0a0a83fdc1cc4fdb04d0a5ec (diff)
downloadtangerine-wallet-browser-a79b4db06a3f9cc76aa68049dafe2cd2caa564b4.tar
tangerine-wallet-browser-a79b4db06a3f9cc76aa68049dafe2cd2caa564b4.tar.gz
tangerine-wallet-browser-a79b4db06a3f9cc76aa68049dafe2cd2caa564b4.tar.bz2
tangerine-wallet-browser-a79b4db06a3f9cc76aa68049dafe2cd2caa564b4.tar.lz
tangerine-wallet-browser-a79b4db06a3f9cc76aa68049dafe2cd2caa564b4.tar.xz
tangerine-wallet-browser-a79b4db06a3f9cc76aa68049dafe2cd2caa564b4.tar.zst
tangerine-wallet-browser-a79b4db06a3f9cc76aa68049dafe2cd2caa564b4.zip
E2E testing with selenium
Diffstat (limited to 'test/e2e/func.js')
-rw-r--r--test/e2e/func.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/func.js b/test/e2e/func.js
new file mode 100644
index 000000000..50363ade3
--- /dev/null
+++ b/test/e2e/func.js
@@ -0,0 +1,17 @@
+const webdriver = require('selenium-webdriver')
+
+exports.delay = function delay (time) {
+ return new Promise(resolve => setTimeout(resolve, time))
+}
+
+
+exports.buildWebDriver = function buildWebDriver (extPath) {
+ return new webdriver.Builder()
+ .withCapabilities({
+ chromeOptions: {
+ args: [`load-extension=${extPath}`],
+ },
+ })
+ .forBrowser('chrome')
+ .build()
+}