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

Ensure receive ETH test selects correct transaction (#8482)

The test for receiving ETH from a contract had been clicking on the
first transaction list item, assuming it was pending. This is not
necessarily true; if the pending transaction hadn't yet been rendered,
this could select the first confirmed transaction instead.

The test has been updated to look for the first _pending_ transaction,
rather than just the first transaction.

Note that this likely does not fix the intermittent failure we've been
experiencing. The failure has been observed with this fix in place.
This commit is contained in:
Mark Stacey 2020-04-30 14:37:01 -03:00 committed by GitHub
parent 388cdccb28
commit 118bddd71a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -732,7 +732,7 @@ describe('MetaMask', function () {
await driver.switchToWindow(extension)
await driver.delay(largeDelayMs * 2)
await driver.clickElement(By.css('.transaction-list-item'))
await driver.clickElement(By.css('.transaction-list__pending-transactions .transaction-list-item'))
await driver.delay(regularDelayMs)
await driver.clickElement(By.xpath(`//button[contains(text(), 'Confirm')]`))