aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e/beta/from-import-beta-ui.spec.js
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-06-21 02:17:11 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-06-21 02:45:22 +0800
commit1509a4393a241eb18be6702a913f2041818b2972 (patch)
tree7de308df3c71d68eb500b5693e43555b79119eb4 /test/e2e/beta/from-import-beta-ui.spec.js
parent4cd4d99e70902fe14c3c91938df8f1557f2524e8 (diff)
downloadtangerine-wallet-browser-1509a4393a241eb18be6702a913f2041818b2972.tar.gz
tangerine-wallet-browser-1509a4393a241eb18be6702a913f2041818b2972.tar.zst
tangerine-wallet-browser-1509a4393a241eb18be6702a913f2041818b2972.zip
Accept whitespace when matching token balances in e2e tests
Diffstat (limited to 'test/e2e/beta/from-import-beta-ui.spec.js')
-rw-r--r--test/e2e/beta/from-import-beta-ui.spec.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/e2e/beta/from-import-beta-ui.spec.js b/test/e2e/beta/from-import-beta-ui.spec.js
index 823c72a3a..8af654319 100644
--- a/test/e2e/beta/from-import-beta-ui.spec.js
+++ b/test/e2e/beta/from-import-beta-ui.spec.js
@@ -348,8 +348,9 @@ describe('Using MetaMask with an existing account', function () {
it('renders the balance for the new token', async () => {
const balance = await findElement(driver, By.css('.tx-view .balance-display .token-amount'))
+ await driver.wait(until.elementTextMatches(balance, /^0\s*BAT\s*$/), 10000)
const tokenAmount = await balance.getText()
- assert.equal(tokenAmount, '0BAT')
+ assert.ok(/^0\s*BAT\s*$/.test(tokenAmount))
await delay(regularDelayMs)
})
})
@@ -421,9 +422,9 @@ describe('Using MetaMask with an existing account', function () {
it('renders the balance for the new token', async () => {
const balance = await findElement(driver, By.css('.tx-view .balance-display .token-amount'))
- await driver.wait(until.elementTextIs(balance, '100TST'))
+ await driver.wait(until.elementTextMatches(balance, /^100\s*TST\s*$/), 10000)
const tokenAmount = await balance.getText()
- assert.equal(tokenAmount, '100TST')
+ assert.ok(/^100\s*TST\s*$/.test(tokenAmount))
await delay(regularDelayMs)
})
})