aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-08-15 23:00:55 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-08-24 07:45:27 +0800
commit6670bc0e09dacaf9a91031a348d1a551ed1e3987 (patch)
treeb8cb8ac31a6e8943288de6632f8997cc0fefc92c
parenta430eed2d89bcadc93bad84859581fb4184ac0f7 (diff)
downloadtangerine-wallet-browser-6670bc0e09dacaf9a91031a348d1a551ed1e3987.tar
tangerine-wallet-browser-6670bc0e09dacaf9a91031a348d1a551ed1e3987.tar.gz
tangerine-wallet-browser-6670bc0e09dacaf9a91031a348d1a551ed1e3987.tar.bz2
tangerine-wallet-browser-6670bc0e09dacaf9a91031a348d1a551ed1e3987.tar.lz
tangerine-wallet-browser-6670bc0e09dacaf9a91031a348d1a551ed1e3987.tar.xz
tangerine-wallet-browser-6670bc0e09dacaf9a91031a348d1a551ed1e3987.tar.zst
tangerine-wallet-browser-6670bc0e09dacaf9a91031a348d1a551ed1e3987.zip
Fix e2e tests
-rw-r--r--test/e2e/beta/from-import-beta-ui.spec.js6
-rw-r--r--test/e2e/beta/metamask-beta-ui.spec.js14
2 files changed, 6 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 1261b6f95..f8a904263 100644
--- a/test/e2e/beta/from-import-beta-ui.spec.js
+++ b/test/e2e/beta/from-import-beta-ui.spec.js
@@ -314,12 +314,12 @@ describe('Using MetaMask with an existing account', function () {
})
it('finds the transaction in the transactions list', async function () {
- const transactions = await findElements(driver, By.css('.tx-list-item'))
+ const transactions = await findElements(driver, By.css('.transaction-list-item'))
assert.equal(transactions.length, 1)
- const txValues = await findElements(driver, By.css('.tx-list-value'))
+ const txValues = await findElements(driver, By.css('.transaction-list-item__amount--secondary'))
assert.equal(txValues.length, 1)
- assert.equal(await txValues[0].getText(), '1 ETH')
+ assert.equal(await txValues[0].getText(), '-1 ETH')
})
})
diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js
index 8ad24e5ea..6a2fb0186 100644
--- a/test/e2e/beta/metamask-beta-ui.spec.js
+++ b/test/e2e/beta/metamask-beta-ui.spec.js
@@ -557,11 +557,8 @@ describe('MetaMask', function () {
await confirmButton.click()
await delay(regularDelayMs)
- // const txStatuses = await findElements(driver, By.css('.transaction-list-item__status'))
- // await driver.wait(until.elementTextMatches(txStatuses[0], /Confirmed/))
- let confirmedTxes
driver.wait(async () => {
- confirmedTxes = await findElements(driver, By.css('.transaction-list__completed-transactions .transaction-list-item'))
+ const confirmedTxes = await findElements(driver, By.css('.transaction-list__completed-transactions .transaction-list-item'))
return confirmedTxes.length === 4
}, 10000)
@@ -592,11 +589,8 @@ describe('MetaMask', function () {
await confirmButton.click()
await delay(regularDelayMs)
- // const txStatuses = await findElements(driver, By.css('.tx-list-status'))
- // await driver.wait(until.elementTextMatches(txStatuses[0], /Confirmed/))
- let confirmedTxes
driver.wait(async () => {
- confirmedTxes = await findElements(driver, By.css('.transaction-list__completed-transactions .transaction-list-item'))
+ const confirmedTxes = await findElements(driver, By.css('.transaction-list__completed-transactions .transaction-list-item'))
return confirmedTxes.length === 5
}, 10000)
@@ -844,8 +838,6 @@ describe('MetaMask', function () {
const confirmedTxes = await findElements(driver, By.css('.transaction-list__completed-transactions .transaction-list-item'))
return confirmedTxes.length === 2
}, 10000)
- // const transactions = await findElements(driver, By.css('.transaction-list-item'))
- // assert.equal(transactions.length, 2)
const txValues = await findElements(driver, By.css('.transaction-list-item__amount--primary'))
await driver.wait(until.elementTextMatches(txValues[0], /-7\sTST/))
@@ -1023,7 +1015,7 @@ describe('MetaMask', function () {
})
it('renders the balance for the chosen token', async () => {
- const balance = await findElement(driver, By.css('.balance-display .token-amount'))
+ const balance = await findElement(driver, By.css('.token-view-balance__token-balance'))
await driver.wait(until.elementTextMatches(balance, /0\sBAT/))
await delay(regularDelayMs)
})