aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e/metamask.spec.js
diff options
context:
space:
mode:
authorThomas Huang <thomas.b.huang@gmail.com>2018-08-02 01:40:31 +0800
committerThomas Huang <thomas.b.huang@gmail.com>2018-08-02 01:40:31 +0800
commit024ebe07e0c61e7185e84499a2f19885ac52e4a9 (patch)
tree88ed997d61c225573b7d75c357f5c11b6840a3ea /test/e2e/metamask.spec.js
parent5b3927fe5b5243a89e5fd31ad069da9ea5c987e9 (diff)
parent4f02726fd9a2b7509dfd00eb4b23d9fc81eb5dcd (diff)
downloadtangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar.gz
tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar.zst
tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.zip
Merge branch 'develop' into network-remove-provider-engine-tests
Diffstat (limited to 'test/e2e/metamask.spec.js')
-rw-r--r--test/e2e/metamask.spec.js24
1 files changed, 20 insertions, 4 deletions
diff --git a/test/e2e/metamask.spec.js b/test/e2e/metamask.spec.js
index d26786ca6..c59983c79 100644
--- a/test/e2e/metamask.spec.js
+++ b/test/e2e/metamask.spec.js
@@ -49,6 +49,18 @@ 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')
+ })
+
})
describe('Account Creation', () => {
@@ -118,9 +130,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 () {
@@ -131,7 +143,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()
})
@@ -163,7 +175,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)
@@ -312,6 +324,10 @@ describe('Metamask popup page', function () {
})
})
+ async function setProviderType (type) {
+ await driver.executeScript('window.metamask.setProviderType(arguments[0])', type)
+ }
+
async function checkBrowserForConsoleErrors () {
const ignoredLogTypes = ['WARNING']
const ignoredErrorMessages = [