aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-06-06 08:46:03 +0800
committerDan <danjm.com@gmail.com>2018-06-06 08:46:03 +0800
commitbb4de95f76cb12059057b10f0a239e82ced2b5ee (patch)
treeaa635dd9496694eeb0826e1311d29fdb03b6667f /test/e2e
parentfbcab7a91ecb73ddf7201090f615b8b5a134ca35 (diff)
downloadtangerine-wallet-browser-bb4de95f76cb12059057b10f0a239e82ced2b5ee.tar
tangerine-wallet-browser-bb4de95f76cb12059057b10f0a239e82ced2b5ee.tar.gz
tangerine-wallet-browser-bb4de95f76cb12059057b10f0a239e82ced2b5ee.tar.bz2
tangerine-wallet-browser-bb4de95f76cb12059057b10f0a239e82ced2b5ee.tar.lz
tangerine-wallet-browser-bb4de95f76cb12059057b10f0a239e82ced2b5ee.tar.xz
tangerine-wallet-browser-bb4de95f76cb12059057b10f0a239e82ced2b5ee.tar.zst
tangerine-wallet-browser-bb4de95f76cb12059057b10f0a239e82ced2b5ee.zip
Fix e2e beta tests to account for add-token updates and actual behaviour of tab openings on installation.
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/beta/from-import-beta-ui.spec.js12
-rw-r--r--test/e2e/beta/metamask-beta-ui.spec.js12
2 files changed, 10 insertions, 14 deletions
diff --git a/test/e2e/beta/from-import-beta-ui.spec.js b/test/e2e/beta/from-import-beta-ui.spec.js
index e07d4a99e..7fec5fa09 100644
--- a/test/e2e/beta/from-import-beta-ui.spec.js
+++ b/test/e2e/beta/from-import-beta-ui.spec.js
@@ -94,11 +94,9 @@ describe('Using MetaMask with an existing account', function () {
await delay(regularDelayMs)
// Close all other tabs
- const [oldUi, infoPage, newUi] = await driver.getAllWindowHandles()
+ const [oldUi, newUi] = await driver.getAllWindowHandles()
await driver.switchTo().window(oldUi)
await driver.close()
- await driver.switchTo().window(infoPage)
- await driver.close()
await driver.switchTo().window(newUi)
await delay(regularDelayMs)
@@ -306,11 +304,11 @@ describe('Using MetaMask with an existing account', function () {
})
it('picks an existing token', async () => {
- const [tokenSearch] = await driver.findElements(By.css('input.add-token__input'))
+ const [tokenSearch] = await driver.findElements(By.css('#search-tokens'))
await tokenSearch.sendKeys('BAT')
await delay(regularDelayMs)
- const [token] = await driver.findElements(By.xpath("//div[contains(text(), 'BAT')]"))
+ const [token] = await driver.findElements(By.xpath("//span[contains(text(), 'BAT')]"))
await token.click()
await delay(regularDelayMs)
@@ -343,7 +341,7 @@ describe('Using MetaMask with an existing account', function () {
tokenName,
tokenDecimal,
tokenSymbol,
- ] = await driver.findElements(By.css('input'))
+ ] = await driver.findElements(By.css('.form-control'))
await totalSupply.sendKeys('100')
await tokenName.sendKeys('Test')
@@ -383,7 +381,7 @@ describe('Using MetaMask with an existing account', function () {
await addCustomToken.click()
await delay(regularDelayMs)
- const [newTokenAddress] = await driver.findElements(By.css('.add-token__add-custom-form input'))
+ const [newTokenAddress] = await driver.findElements(By.css('#custom-address'))
await newTokenAddress.sendKeys(tokenAddress)
await delay(regularDelayMs)
diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js
index 028fef960..ff799f888 100644
--- a/test/e2e/beta/metamask-beta-ui.spec.js
+++ b/test/e2e/beta/metamask-beta-ui.spec.js
@@ -91,11 +91,9 @@ describe('MetaMask', function () {
await delay(regularDelayMs)
// Close all other tabs
- const [oldUi, infoPage, newUi] = await driver.getAllWindowHandles()
+ const [oldUi, newUi] = await driver.getAllWindowHandles()
await driver.switchTo().window(oldUi)
await driver.close()
- await driver.switchTo().window(infoPage)
- await driver.close()
await driver.switchTo().window(newUi)
await delay(regularDelayMs)
@@ -391,11 +389,11 @@ describe('MetaMask', function () {
})
it('can pick a token from the existing options', async () => {
- const [tokenSearch] = await driver.findElements(By.css('input.add-token__input'))
+ const [tokenSearch] = await driver.findElements(By.css('#search-tokens'))
await tokenSearch.sendKeys('BAT')
await delay(regularDelayMs)
- const [token] = await driver.findElements(By.xpath("//div[contains(text(), 'BAT')]"))
+ const [token] = await driver.findElements(By.xpath("//span[contains(text(), 'BAT')]"))
await token.click()
await delay(regularDelayMs)
@@ -428,7 +426,7 @@ describe('MetaMask', function () {
tokenName,
tokenDecimal,
tokenSymbol,
- ] = await driver.findElements(By.css('input'))
+ ] = await driver.findElements(By.css('.form-control'))
await totalSupply.sendKeys('100')
await tokenName.sendKeys('Test')
@@ -468,7 +466,7 @@ describe('MetaMask', function () {
await addCustomToken.click()
await delay(regularDelayMs)
- const [newTokenAddress] = await driver.findElements(By.css('.add-token__add-custom-form input'))
+ const [newTokenAddress] = await driver.findElements(By.css('#custom-address'))
await newTokenAddress.sendKeys(tokenAddress)
await delay(regularDelayMs)