From 07c0cd59d4b670eafc5d6c20ab9f54faa841ee1c Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Thu, 26 Jul 2018 13:32:17 -0230 Subject: New ui e2e tests switch to localhost provider (needed after new ui selection screen addition). --- test/e2e/beta/from-import-beta-ui.spec.js | 10 ++++++++++ test/e2e/beta/metamask-beta-ui.spec.js | 10 ++++++++++ 2 files changed, 20 insertions(+) (limited to 'test') diff --git a/test/e2e/beta/from-import-beta-ui.spec.js b/test/e2e/beta/from-import-beta-ui.spec.js index c271461d3..92e5be715 100644 --- a/test/e2e/beta/from-import-beta-ui.spec.js +++ b/test/e2e/beta/from-import-beta-ui.spec.js @@ -229,6 +229,16 @@ describe('Using MetaMask with an existing account', function () { }) describe('Add an account', () => { + it('switches to localhost', async () => { + const networkDropdown = await findElement(driver, By.css('.network-name')) + await networkDropdown.click() + await delay(regularDelayMs) + + const [localhost] = await findElements(driver, By.xpath(`//span[contains(text(), 'Localhost')]`)) + await localhost.click() + await delay(largeDelayMs * 2) + }) + it('choose Create Account from the account menu', async () => { await driver.findElement(By.css('.account-menu__icon')).click() await delay(regularDelayMs) diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js index 1590e6d35..6a169de76 100644 --- a/test/e2e/beta/metamask-beta-ui.spec.js +++ b/test/e2e/beta/metamask-beta-ui.spec.js @@ -387,6 +387,16 @@ describe('MetaMask', function () { await delay(regularDelayMs) }) + it('switches to localhost', async () => { + const networkDropdown = await findElement(driver, By.css('.network-name')) + await networkDropdown.click() + await delay(regularDelayMs) + + const [localhost] = await findElements(driver, By.xpath(`//span[contains(text(), 'Localhost')]`)) + await localhost.click() + await delay(largeDelayMs * 2) + }) + it('balance renders', async () => { const balance = await findElement(driver, By.css('.balance-display .token-amount')) await driver.wait(until.elementTextMatches(balance, /100.+ETH/)) -- cgit v1.2.3