From 30d92b8d3f4c38dcd83bab97576775c0096adc1a Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Thu, 26 Jul 2018 10:54:38 -0230 Subject: Fix e2e tests to accomodate new ui suggestion screen changes. --- test/e2e/metamask.spec.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'test/e2e/metamask.spec.js') diff --git a/test/e2e/metamask.spec.js b/test/e2e/metamask.spec.js index b6efae5b3..ac7600f09 100644 --- a/test/e2e/metamask.spec.js +++ b/test/e2e/metamask.spec.js @@ -59,6 +59,13 @@ describe('Metamask popup page', function () { await driver.switchTo().window(windowHandles[0]) }) + it('does not select the new UI option', async () => { + await delay(300) + const button = await driver.findElement(By.xpath("//button[contains(text(), 'No thanks, maybe later')]")) + await button.click() + await delay(1000) + }) + it('sets provider type to localhost', async function () { await delay(300) await setProviderType('localhost') @@ -133,9 +140,9 @@ describe('Metamask popup page', function () { }) it('adds a second account', async function () { - await driver.findElement(By.css('#app-content > div > div.full-width > div > div:nth-child(2) > span > div')).click() + await driver.findElement(By.css('div.full-width > div > div:nth-child(2) > span > div')).click() await delay(300) - await driver.findElement(By.css('#app-content > div > div.full-width > div > div:nth-child(2) > span > div > div > span > div > li:nth-child(3) > span')).click() + await driver.findElement(By.css('div.full-width > div > div:nth-child(2) > span > div > div > span > div > li:nth-child(3) > span')).click() }) it('shows account address', async function () { @@ -146,7 +153,7 @@ describe('Metamask popup page', function () { it('logs out of the vault', async () => { await driver.findElement(By.css('.sandwich-expando')).click() await delay(500) - const logoutButton = await driver.findElement(By.css('#app-content > div > div:nth-child(3) > span > div > li:nth-child(3)')) + const logoutButton = await driver.findElement(By.css('.menu-droppo > li:nth-child(3)')) assert.equal(await logoutButton.getText(), 'Log Out') await logoutButton.click() }) @@ -178,7 +185,7 @@ describe('Metamask popup page', function () { it('logs out', async function () { await driver.findElement(By.css('.sandwich-expando')).click() await delay(200) - const logOut = await driver.findElement(By.css('#app-content > div > div:nth-child(3) > span > div > li:nth-child(3)')) + const logOut = await driver.findElement(By.css('.menu-droppo > li:nth-child(3)')) assert.equal(await logOut.getText(), 'Log Out') await logOut.click() await delay(300) -- cgit