1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 17:33:23 +01:00

Fix e2e test for NFT interactions (#18540)

The test `should transfer a single ERC721 NFT from one account to another`
has been failing intermittently. It seems to be failing due to a race
condition; the first render shows "Send Token" but later renders show
"Send TDC". The test only passes if it runs fast enough to read the
first render of the list item component.

The test has been updated to look for the text "Send TDC", which is
what the component shows from the second render onward.
This commit is contained in:
Mark Stacey 2023-04-12 09:21:33 -02:30 committed by GitHub
parent b3c4790f43
commit 7f6bdf0178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,9 +62,7 @@ describe('ERC721 NFTs testdapp interaction', function () {
);
// Verify transaction
const completedTx = await driver.findElement('.list-item__title');
const completedTxText = await completedTx.getText();
assert.equal(completedTxText, 'Send Token');
await driver.findElement({ text: 'Send TDC' });
},
);
});