mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix intermittent reject transaction test failure (#8478)
This test would occasionally fail due to a fluke of timing, where a pending transaction would take slightly longer than expected to be rendered in the "confirmed transactions" list. This `wait` block ensures the test will try again until it has confirmed.
This commit is contained in:
parent
bae8ef8b70
commit
b9860034f2
@ -599,8 +599,10 @@ describe('MetaMask', function () {
|
||||
await driver.clickElement(By.xpath(`//button[contains(text(), 'Reject All')]`))
|
||||
await driver.delay(largeDelayMs * 2)
|
||||
|
||||
const confirmedTxes = await driver.findElements(By.css('.transaction-list__completed-transactions .transaction-list-item'))
|
||||
assert.equal(confirmedTxes.length, 5, '5 transactions present')
|
||||
await driver.wait(async () => {
|
||||
const confirmedTxes = await driver.findElements(By.css('.transaction-list__completed-transactions .transaction-list-item'))
|
||||
return confirmedTxes.length === 5
|
||||
}, 10000)
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user