1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Fix tests

This commit is contained in:
Alexander Tseung 2018-08-03 13:11:31 -07:00
parent 5ddd9b55be
commit 13c4ecd610

View File

@ -414,12 +414,12 @@ describe('MetaMask', 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)
if (process.env.SELENIUM_BROWSER !== 'firefox') {
const txValues = await findElement(driver, By.css('.tx-list-value'))
await driver.wait(until.elementTextMatches(txValues, /1\sETH/), 10000)
const txValues = await findElement(driver, By.css('.transaction-list-item__amount--secondary'))
await driver.wait(until.elementTextMatches(txValues, /-1\sETH/), 10000)
}
})
})
@ -457,14 +457,11 @@ describe('MetaMask', 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, 2)
const txStatuses = await findElements(driver, By.css('.tx-list-status'))
await driver.wait(until.elementTextMatches(txStatuses[0], /Confirmed/))
const txValues = await findElement(driver, By.css('.tx-list-value'))
await driver.wait(until.elementTextMatches(txValues, /3\sETH/), 10000)
const txValues = await findElement(driver, By.css('.transaction-list-item__amount--secondary'))
await driver.wait(until.elementTextMatches(txValues, /-3\sETH/), 10000)
})
})