mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
Stabilize nft e2e tests (#18006)
This commit is contained in:
parent
912f6755b1
commit
c8e8db2666
@ -42,7 +42,7 @@ describe('Import ERC1155 NFT', function () {
|
||||
await driver.fill('[data-testid="token-id"]', '1');
|
||||
await driver.clickElement({ text: 'Add', tag: 'button' });
|
||||
|
||||
const newNftNotification = await driver.findElement({
|
||||
const newNftNotification = await driver.findVisibleElement({
|
||||
text: 'NFT was successfully added!',
|
||||
tag: 'h6',
|
||||
});
|
||||
@ -53,10 +53,11 @@ describe('Import ERC1155 NFT', function () {
|
||||
css: 'h5',
|
||||
text: 'Rocks',
|
||||
});
|
||||
const importedERC1155Image = await driver.waitForSelector(
|
||||
'[class="nfts-items__item-image"]',
|
||||
);
|
||||
assert.equal(await importedERC1155.isDisplayed(), true);
|
||||
|
||||
const importedERC1155Image = await driver.findVisibleElement(
|
||||
'.nfts-items__item img',
|
||||
);
|
||||
assert.equal(await importedERC1155Image.isDisplayed(), true);
|
||||
},
|
||||
);
|
||||
|
@ -39,8 +39,11 @@ describe('Remove ERC1155 NFT', function () {
|
||||
await driver.fill('[data-testid="token-id"]', '1');
|
||||
await driver.clickElement({ text: 'Add', tag: 'button' });
|
||||
|
||||
// Open the details and click remove nft button
|
||||
await driver.clickElement('.nfts-items__item-image');
|
||||
// Open the details page and click remove nft button
|
||||
const importedNftImage = await driver.findVisibleElement(
|
||||
'.nfts-items__item img',
|
||||
);
|
||||
await importedNftImage.click();
|
||||
await driver.clickElement('[data-testid="nft-options__button"]');
|
||||
await driver.clickElement('[data-testid="nft-item-remove"]');
|
||||
|
||||
|
@ -42,7 +42,10 @@ describe('View ERC1155 NFT details', function () {
|
||||
await driver.clickElement({ text: 'Add', tag: 'button' });
|
||||
|
||||
// Click to open the NFT details page and check displayed account
|
||||
await driver.clickElement('.nfts-items__item-image');
|
||||
const importedNftImage = await driver.findVisibleElement(
|
||||
'.nfts-items__item img',
|
||||
);
|
||||
await importedNftImage.click();
|
||||
const detailsPageAccount = await driver.findElement(
|
||||
'.asset-breadcrumb span:nth-of-type(2)',
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user