mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix e2e tests
This commit is contained in:
parent
a430eed2d8
commit
6670bc0e09
@ -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')
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -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)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user