From 7918240833871648dea6f9787519ba20f1e51899 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 13 Aug 2018 10:31:07 -0700 Subject: [PATCH] Confirms new contract token in the popup --- test/e2e/beta/metamask-beta-ui.spec.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js index 66369fcb5..807282411 100644 --- a/test/e2e/beta/metamask-beta-ui.spec.js +++ b/test/e2e/beta/metamask-beta-ui.spec.js @@ -513,7 +513,6 @@ describe('MetaMask', function () { it('confirms a deploy contract transaction in the popup', async () => { const windowHandles = await driver.getAllWindowHandles() - extension = windowHandles[0] const popup = windowHandles[2] await driver.switchTo().window(popup) const confirmButton = await findElement(driver, By.xpath(`//button[contains(text(), 'Confirm')]`)) @@ -622,20 +621,21 @@ describe('MetaMask', function () { describe('Add a custom token from a dapp', () => { it('creates a new token', async () => { - const windowHandles = await driver.getAllWindowHandles() + let windowHandles = await driver.getAllWindowHandles() const extension = windowHandles[0] const dapp = windowHandles[1] await delay(regularDelayMs * 2) await driver.switchTo().window(dapp) - await delay(regularDelayMs) + await delay(regularDelayMs * 2) const createToken = await findElement(driver, By.xpath(`//button[contains(text(), 'Create Token')]`)) await createToken.click() - await delay(regularDelayMs) + await delay(largeDelayMs) - await driver.switchTo().window(extension) - await loadExtension(driver, extensionId) + windowHandles = await driver.getAllWindowHandles() + const popup = windowHandles[2] + await driver.switchTo().window(popup) await delay(regularDelayMs) const confirmButton = await findElement(driver, By.xpath(`//button[contains(text(), 'Confirm')]`))