aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-07-18 09:54:04 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-07-18 09:54:04 +0800
commitaa5a987765677b4945e9eefe03cae8dcc93318cd (patch)
tree39a0c065a788d173a822c47be242e28e7f5f3983 /test
parentcb53d5122cac179f430fb015974e80310c96a2f2 (diff)
downloadtangerine-wallet-browser-aa5a987765677b4945e9eefe03cae8dcc93318cd.tar
tangerine-wallet-browser-aa5a987765677b4945e9eefe03cae8dcc93318cd.tar.gz
tangerine-wallet-browser-aa5a987765677b4945e9eefe03cae8dcc93318cd.tar.bz2
tangerine-wallet-browser-aa5a987765677b4945e9eefe03cae8dcc93318cd.tar.lz
tangerine-wallet-browser-aa5a987765677b4945e9eefe03cae8dcc93318cd.tar.xz
tangerine-wallet-browser-aa5a987765677b4945e9eefe03cae8dcc93318cd.tar.zst
tangerine-wallet-browser-aa5a987765677b4945e9eefe03cae8dcc93318cd.zip
added some e2e tests
Diffstat (limited to 'test')
-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..938d22cd9 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(), 'Bummer! 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)
+ }
+ })
+ })
})