diff options
author | Thomas <thomas.b.huang@gmail.com> | 2018-05-30 13:34:17 +0800 |
---|---|---|
committer | Thomas <thomas.b.huang@gmail.com> | 2018-05-30 13:34:17 +0800 |
commit | 54ccf5e93068b330dc6c3d4517ad28192c751293 (patch) | |
tree | c430207d6efec39acb9306a1db0d3bea1970ab53 /test/screens/new-ui.js | |
parent | f90ad6191cde32830cff4a82d3d8c6a31155bc29 (diff) | |
parent | 77c55ecd83416ec0d7eeca897923c5d0e3f23d4c (diff) | |
download | tangerine-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/screens/new-ui.js')
-rw-r--r-- | test/screens/new-ui.js | 10 |
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() |