mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Accept whitespace when matching token balances in e2e tests
This commit is contained in:
parent
4cd4d99e70
commit
1509a4393a
@ -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)
|
||||
})
|
||||
})
|
||||
|
@ -430,9 +430,9 @@ describe('MetaMask', function () {
|
||||
|
||||
it('renders the balance for the chosen token', async () => {
|
||||
const balance = await findElement(driver, By.css('.tx-view .balance-display .token-amount'))
|
||||
await driver.wait(until.elementTextIs(balance, '0BAT'), 10000)
|
||||
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)
|
||||
})
|
||||
})
|
||||
@ -504,9 +504,9 @@ describe('MetaMask', 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*$/))
|
||||
const tokenAmount = await balance.getText()
|
||||
assert.equal(tokenAmount, '100TST')
|
||||
assert.ok(/^100\s*TST\s*$/.test(tokenAmount))
|
||||
await delay(regularDelayMs)
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user