aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e
diff options
context:
space:
mode:
authorBruno Barbieri <bruno.barbieri@consensys.net>2018-07-20 03:00:59 +0800
committerGitHub <noreply@github.com>2018-07-20 03:00:59 +0800
commit9be2248d7accfc51fd21f31b16d08c18a468c0f7 (patch)
treed52384c0b0803e68188fe310a665cec2890b5680 /test/e2e
parent3784a7e2c852974315cfe17a68673938cf24a7fa (diff)
parentdf19163bf9611d75aaf8ea6da52651dbba9a5e00 (diff)
downloadtangerine-wallet-browser-9be2248d7accfc51fd21f31b16d08c18a468c0f7.tar
tangerine-wallet-browser-9be2248d7accfc51fd21f31b16d08c18a468c0f7.tar.gz
tangerine-wallet-browser-9be2248d7accfc51fd21f31b16d08c18a468c0f7.tar.bz2
tangerine-wallet-browser-9be2248d7accfc51fd21f31b16d08c18a468c0f7.tar.lz
tangerine-wallet-browser-9be2248d7accfc51fd21f31b16d08c18a468c0f7.tar.xz
tangerine-wallet-browser-9be2248d7accfc51fd21f31b16d08c18a468c0f7.tar.zst
tangerine-wallet-browser-9be2248d7accfc51fd21f31b16d08c18a468c0f7.zip
Merge pull request #4625 from MetaMask/initial-trezor-support
Initial trezor support
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/beta/from-import-beta-ui.spec.js47
1 files changed, 47 insertions, 0 deletions
diff --git a/test/e2e/beta/from-import-beta-ui.spec.js b/test/e2e/beta/from-import-beta-ui.spec.js
index b396dc5b9..32f57b157 100644
--- a/test/e2e/beta/from-import-beta-ui.spec.js
+++ b/test/e2e/beta/from-import-beta-ui.spec.js
@@ -321,4 +321,51 @@ describe('Using MetaMask with an existing account', function () {
})
})
+ describe('Connects to a Hardware wallet', () => {
+ it('choose Connect Hardware Wallet from the account menu', async () => {
+ await driver.findElement(By.css('.account-menu__icon')).click()
+ await delay(regularDelayMs)
+
+ const [connectAccount] = await findElements(driver, By.xpath(`//div[contains(text(), 'Connect Hardware Wallet')]`))
+ await connectAccount.click()
+ await delay(regularDelayMs)
+ })
+
+ it('should open the TREZOR Connect popup', async () => {
+ const connectButtons = await findElements(driver, By.xpath(`//button[contains(text(), 'Connect to Trezor')]`))
+ await connectButtons[0].click()
+ await delay(regularDelayMs)
+ const allWindows = await driver.getAllWindowHandles()
+ switch (process.env.SELENIUM_BROWSER) {
+ case 'chrome':
+ assert.equal(allWindows.length, 2)
+ break
+ default:
+ assert.equal(allWindows.length, 1)
+ }
+ })
+
+ it('should show the "Browser not supported" screen for non Chrome browsers', async () => {
+ if (process.env.SELENIUM_BROWSER !== 'chrome') {
+ const title = await findElements(driver, By.xpath(`//h3[contains(text(), 'Your Browser is not supported...')]`))
+ assert.equal(title.length, 1)
+
+ const downloadChromeButtons = await findElements(driver, By.xpath(`//button[contains(text(), 'Download Google Chrome')]`))
+ assert.equal(downloadChromeButtons.length, 1)
+
+ await downloadChromeButtons[0].click()
+ await delay(regularDelayMs)
+
+ const [newUITab, downloadChromeTab] = await driver.getAllWindowHandles()
+
+ await driver.switchTo().window(downloadChromeTab)
+ await delay(regularDelayMs)
+ const tabUrl = await driver.getCurrentUrl()
+ assert.equal(tabUrl, 'https://www.google.com/chrome/')
+ await driver.close()
+ await delay(regularDelayMs)
+ await driver.switchTo().window(newUITab)
+ }
+ })
+ })
})