aboutsummaryrefslogtreecommitdiffstats
path: root/test/screens
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-03-31 02:16:08 +0800
committerkumavis <aaron@kumavis.me>2018-03-31 02:16:08 +0800
commitb014133fdc14ca4fe83b9cb59d181a7745af8de7 (patch)
treebfdc24248523bd23c5af3a5858db1621d76430bb /test/screens
parent5f1f345a5d7f428c939a6ab3cbf9d5ac56cb58ed (diff)
downloadtangerine-wallet-browser-b014133fdc14ca4fe83b9cb59d181a7745af8de7.tar
tangerine-wallet-browser-b014133fdc14ca4fe83b9cb59d181a7745af8de7.tar.gz
tangerine-wallet-browser-b014133fdc14ca4fe83b9cb59d181a7745af8de7.tar.bz2
tangerine-wallet-browser-b014133fdc14ca4fe83b9cb59d181a7745af8de7.tar.lz
tangerine-wallet-browser-b014133fdc14ca4fe83b9cb59d181a7745af8de7.tar.xz
tangerine-wallet-browser-b014133fdc14ca4fe83b9cb59d181a7745af8de7.tar.zst
tangerine-wallet-browser-b014133fdc14ca4fe83b9cb59d181a7745af8de7.zip
development - screens - use localhost for network
Diffstat (limited to 'test/screens')
-rw-r--r--test/screens/new.spec.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/screens/new.spec.js b/test/screens/new.spec.js
index 14daac1c1..2af891060 100644
--- a/test/screens/new.spec.js
+++ b/test/screens/new.spec.js
@@ -35,6 +35,7 @@ async function captureAllScreens() {
tabs = await driver.getAllWindowHandles()
await driver.switchTo().window(tabs[0])
await delay(300)
+ await setProviderType('localhost')
// click try new ui
await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div.flex-row.flex-center.flex-grow > p')).click()
@@ -42,8 +43,12 @@ async function captureAllScreens() {
// close metamask homepage and extra home.html
tabs = await driver.getAllWindowHandles()
- await driver.switchTo().window(tabs[2])
- driver.close()
+ console.log(tabs)
+ // metamask homepage is opened on prod, not dev
+ if (tabs.length > 2) {
+ await driver.switchTo().window(tabs[2])
+ driver.close()
+ }
await driver.switchTo().window(tabs[1])
driver.close()
await driver.switchTo().window(tabs[0])
@@ -159,7 +164,11 @@ async function captureAllScreens() {
}
async function setLocale(code) {
- await driver.executeScript('setLocale(arguments[0])', code)
+ await driver.executeScript('window.metamask.updateCurrentLocale(arguments[0])', code)
+ }
+
+ async function setProviderType(type) {
+ await driver.executeScript('window.metamask.setProviderType(arguments[0])', type)
}
// cleanup