aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-07-02 21:41:49 +0800
committerGitHub <noreply@github.com>2018-07-02 21:41:49 +0800
commitc25a4ff5143b1e5b71dc24163bc1a7c3518fb2fd (patch)
treeadd06fdf6b777bd0c42ce3a0841365d51a1e3aae
parentb2e64f24ecbc9e309869e678254cf755ffe11b40 (diff)
parentc5a16af83141c6488432cec5ba6de09f5cd39714 (diff)
downloadtangerine-wallet-browser-c25a4ff5143b1e5b71dc24163bc1a7c3518fb2fd.tar
tangerine-wallet-browser-c25a4ff5143b1e5b71dc24163bc1a7c3518fb2fd.tar.gz
tangerine-wallet-browser-c25a4ff5143b1e5b71dc24163bc1a7c3518fb2fd.tar.bz2
tangerine-wallet-browser-c25a4ff5143b1e5b71dc24163bc1a7c3518fb2fd.tar.lz
tangerine-wallet-browser-c25a4ff5143b1e5b71dc24163bc1a7c3518fb2fd.tar.xz
tangerine-wallet-browser-c25a4ff5143b1e5b71dc24163bc1a7c3518fb2fd.tar.zst
tangerine-wallet-browser-c25a4ff5143b1e5b71dc24163bc1a7c3518fb2fd.zip
Merge pull request #4692 from MetaMask/improve-e2e-beta-test-startup
Improve checks for closing info page on app installation in e2e beta tests.
-rw-r--r--test/e2e/beta/metamask-beta-ui.spec.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js
index 387d8c348..0f424abcc 100644
--- a/test/e2e/beta/metamask-beta-ui.spec.js
+++ b/test/e2e/beta/metamask-beta-ui.spec.js
@@ -100,15 +100,21 @@ describe('MetaMask', function () {
await delay(regularDelayMs)
// Close all other tabs
- let [oldUi, infoPage, newUi] = await driver.getAllWindowHandles()
- newUi = newUi || infoPage
+ let [oldUi, tab1, tab2] = await driver.getAllWindowHandles()
await driver.switchTo().window(oldUi)
await driver.close()
- if (infoPage !== newUi) {
- await driver.switchTo().window(infoPage)
+
+ await driver.switchTo().window(tab1)
+ const tab1Url = await driver.getCurrentUrl()
+ if (tab1Url.match(/metamask.io/)) {
+ await driver.switchTo().window(tab1)
+ await driver.close()
+ await driver.switchTo().window(tab2)
+ } else if (tab2) {
+ await driver.switchTo().window(tab2)
await driver.close()
+ await driver.switchTo().window(tab1)
}
- await driver.switchTo().window(newUi)
await delay(regularDelayMs)
const continueBtn = await findElement(driver, By.css('.welcome-screen__button'))