aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-05-30 13:13:58 +0800
committerkumavis <aaron@kumavis.me>2018-05-30 13:13:58 +0800
commit73afb263cb80a54cc52e50349c3d9f4fe173bd98 (patch)
tree55f06a5c35822c2cd62e590de1af9a16da6f88cf
parentd6965c7cdbd7c01a9901ea1125ac77000e0f8b25 (diff)
downloadtangerine-wallet-browser-73afb263cb80a54cc52e50349c3d9f4fe173bd98.tar
tangerine-wallet-browser-73afb263cb80a54cc52e50349c3d9f4fe173bd98.tar.gz
tangerine-wallet-browser-73afb263cb80a54cc52e50349c3d9f4fe173bd98.tar.bz2
tangerine-wallet-browser-73afb263cb80a54cc52e50349c3d9f4fe173bd98.tar.lz
tangerine-wallet-browser-73afb263cb80a54cc52e50349c3d9f4fe173bd98.tar.xz
tangerine-wallet-browser-73afb263cb80a54cc52e50349c3d9f4fe173bd98.tar.zst
tangerine-wallet-browser-73afb263cb80a54cc52e50349c3d9f4fe173bd98.zip
ci - job-screens - use e2e funcs
-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()