aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorThomas <thomas.b.huang@gmail.com>2018-05-30 13:34:17 +0800
committerThomas <thomas.b.huang@gmail.com>2018-05-30 13:34:17 +0800
commit54ccf5e93068b330dc6c3d4517ad28192c751293 (patch)
treec430207d6efec39acb9306a1db0d3bea1970ab53 /test
parentf90ad6191cde32830cff4a82d3d8c6a31155bc29 (diff)
parent77c55ecd83416ec0d7eeca897923c5d0e3f23d4c (diff)
downloadtangerine-wallet-browser-54ccf5e93068b330dc6c3d4517ad28192c751293.tar
tangerine-wallet-browser-54ccf5e93068b330dc6c3d4517ad28192c751293.tar.gz
tangerine-wallet-browser-54ccf5e93068b330dc6c3d4517ad28192c751293.tar.bz2
tangerine-wallet-browser-54ccf5e93068b330dc6c3d4517ad28192c751293.tar.lz
tangerine-wallet-browser-54ccf5e93068b330dc6c3d4517ad28192c751293.tar.xz
tangerine-wallet-browser-54ccf5e93068b330dc6c3d4517ad28192c751293.tar.zst
tangerine-wallet-browser-54ccf5e93068b330dc6c3d4517ad28192c751293.zip
Merge branch 'develop' into e2e-test
Diffstat (limited to 'test')
-rw-r--r--test/screens/new-ui.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/screens/new-ui.js b/test/screens/new-ui.js
index 6b873ac85..65a542e49 100644
--- a/test/screens/new-ui.js
+++ b/test/screens/new-ui.js
@@ -11,9 +11,8 @@ const GIFEncoder = require('gifencoder')
const pngFileStream = require('png-file-stream')
const sizeOfPng = require('image-size/lib/types/png')
const By = webdriver.By
-const { delay, buildWebDriver } = require('./func')
const localesIndex = require('../../app/_locales/index.json')
-// const localesIndex = []
+const { delay, buildChromeWebDriver, buildFirefoxWebdriver, installWebExt, getExtensionIdChrome, getExtensionIdFirefox } = require('../e2e/func')
const eth = new Ethjs(new Ethjs.HttpProvider('http://localhost:8545'))
@@ -50,11 +49,10 @@ async function captureAllScreens() {
await cleanScreenShotDir()
- // setup selenium and install extension
const extPath = path.resolve('dist/chrome')
- driver = buildWebDriver(extPath)
- await driver.get('chrome://extensions-frame')
- const extensionId = await driver.executeScript('return document.querySelector("extensions-manager").shadowRoot.querySelector("extensions-view-manager extensions-item-list").shadowRoot.querySelector("#container > div.items-container > extensions-item:nth-child(2)").getAttribute("id")')
+ driver = buildChromeWebDriver(extPath)
+ const extensionId = await getExtensionIdChrome(driver)
+
await driver.get(`chrome-extension://${extensionId}/home.html`)
await delay(500)
tabs = await driver.getAllWindowHandles()