mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
Remove timeouts without effect (#18342)
This commit is contained in:
parent
0f1b86a037
commit
d4f04815c2
@ -346,13 +346,10 @@ describe('MetaMask', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('finds the transaction in the transactions list', async function () {
|
it('finds the transaction in the transactions list', async function () {
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector({
|
||||||
{
|
|
||||||
css: '.transaction-list__completed-transactions .transaction-list-item__primary-currency',
|
css: '.transaction-list__completed-transactions .transaction-list-item__primary-currency',
|
||||||
text: '-1 TST',
|
text: '-1 TST',
|
||||||
},
|
});
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
|
||||||
|
|
||||||
await driver.waitForSelector({
|
await driver.waitForSelector({
|
||||||
css: '.list-item__heading',
|
css: '.list-item__heading',
|
||||||
@ -380,13 +377,10 @@ describe('MetaMask', function () {
|
|||||||
await driver.delay(largeDelayMs);
|
await driver.delay(largeDelayMs);
|
||||||
|
|
||||||
await driver.findElements('.transaction-list__pending-transactions');
|
await driver.findElements('.transaction-list__pending-transactions');
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector({
|
||||||
{
|
|
||||||
css: '.transaction-list-item__primary-currency',
|
css: '.transaction-list-item__primary-currency',
|
||||||
text: '-1.5 TST',
|
text: '-1.5 TST',
|
||||||
},
|
});
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
|
||||||
await driver.clickElement('.transaction-list-item__primary-currency');
|
await driver.clickElement('.transaction-list-item__primary-currency');
|
||||||
await driver.delay(regularDelayMs);
|
await driver.delay(regularDelayMs);
|
||||||
|
|
||||||
|
@ -59,7 +59,6 @@ describe('ERC721 NFTs testdapp interaction', function () {
|
|||||||
await driver.clickElement('[data-testid="home__activity-tab"]');
|
await driver.clickElement('[data-testid="home__activity-tab"]');
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Verify transaction
|
// Verify transaction
|
||||||
@ -130,7 +129,6 @@ describe('ERC721 NFTs testdapp interaction', function () {
|
|||||||
await driver.clickElement('[data-testid="home__activity-tab"]');
|
await driver.clickElement('[data-testid="home__activity-tab"]');
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Verify transaction
|
// Verify transaction
|
||||||
@ -202,7 +200,6 @@ describe('ERC721 NFTs testdapp interaction', function () {
|
|||||||
await driver.clickElement('[data-testid="home__activity-tab"]');
|
await driver.clickElement('[data-testid="home__activity-tab"]');
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Verify transaction
|
// Verify transaction
|
||||||
@ -277,7 +274,6 @@ describe('ERC721 NFTs testdapp interaction', function () {
|
|||||||
await driver.clickElement('[data-testid="home__activity-tab"]');
|
await driver.clickElement('[data-testid="home__activity-tab"]');
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Verify transaction
|
// Verify transaction
|
||||||
|
@ -63,13 +63,10 @@ describe('Address Book', function () {
|
|||||||
return confirmedTxes.length === 1;
|
return confirmedTxes.length === 1;
|
||||||
}, 10000);
|
}, 10000);
|
||||||
|
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector({
|
||||||
{
|
|
||||||
css: '.transaction-list-item__primary-currency',
|
css: '.transaction-list-item__primary-currency',
|
||||||
text: '-2 ETH',
|
text: '-2 ETH',
|
||||||
},
|
});
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -34,14 +34,14 @@ describe('Clear account activity', function () {
|
|||||||
|
|
||||||
// Check send transaction and receive transaction history are all displayed
|
// Check send transaction and receive transaction history are all displayed
|
||||||
await driver.clickElement('[data-testid="home__activity-tab"]');
|
await driver.clickElement('[data-testid="home__activity-tab"]');
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector({
|
||||||
{ css: '.list-item__title', text: 'Send' },
|
css: '.list-item__title',
|
||||||
{ timeout: 10000 },
|
text: 'Send',
|
||||||
);
|
});
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector({
|
||||||
{ css: '.list-item__title', text: 'Receive' },
|
css: '.list-item__title',
|
||||||
{ timeout: 10000 },
|
text: 'Receive',
|
||||||
);
|
});
|
||||||
|
|
||||||
// Clear activity and nonce data
|
// Clear activity and nonce data
|
||||||
await driver.clickElement('.account-menu__icon');
|
await driver.clickElement('.account-menu__icon');
|
||||||
|
@ -63,15 +63,11 @@ describe('Deploy contract and call contract methods', function () {
|
|||||||
await driver.clickElement({ text: 'Activity', tag: 'button' });
|
await driver.clickElement({ text: 'Activity', tag: 'button' });
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
);
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector({
|
||||||
{
|
|
||||||
css: '.transaction-list-item__primary-currency',
|
css: '.transaction-list-item__primary-currency',
|
||||||
text: '-4 ETH',
|
text: '-4 ETH',
|
||||||
},
|
});
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
|
||||||
|
|
||||||
// calls and confirms a contract method where ETH is received
|
// calls and confirms a contract method where ETH is received
|
||||||
await driver.switchToWindow(dapp);
|
await driver.switchToWindow(dapp);
|
||||||
@ -87,26 +83,19 @@ describe('Deploy contract and call contract methods', function () {
|
|||||||
await driver.switchToWindow(extension);
|
await driver.switchToWindow(extension);
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(2)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(2)',
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
);
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector({
|
||||||
{
|
|
||||||
css: '.transaction-list-item__primary-currency',
|
css: '.transaction-list-item__primary-currency',
|
||||||
text: '-0 ETH',
|
text: '-0 ETH',
|
||||||
},
|
});
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
|
||||||
|
|
||||||
// renders the correct ETH balance
|
// renders the correct ETH balance
|
||||||
await driver.switchToWindow(extension);
|
await driver.switchToWindow(extension);
|
||||||
const balance = await ganacheServer.getBalance();
|
const balance = await ganacheServer.getBalance();
|
||||||
const balanceElement = await driver.waitForSelector(
|
const balanceElement = await driver.waitForSelector({
|
||||||
{
|
|
||||||
css: '[data-testid="eth-overview__primary-currency"]',
|
css: '[data-testid="eth-overview__primary-currency"]',
|
||||||
text: balance,
|
text: balance,
|
||||||
},
|
});
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
|
||||||
assert.equal(`${balance}\nETH`, await balanceElement.getText());
|
assert.equal(`${balance}\nETH`, await balanceElement.getText());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -71,7 +71,6 @@ describe('Failing contract interaction ', function () {
|
|||||||
await driver.clickElement({ text: 'Activity', tag: 'button' });
|
await driver.clickElement({ text: 'Activity', tag: 'button' });
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// display the transaction status
|
// display the transaction status
|
||||||
@ -157,7 +156,6 @@ describe('Failing contract interaction on non-EIP1559 network', function () {
|
|||||||
await driver.clickElement({ text: 'Activity', tag: 'button' });
|
await driver.clickElement({ text: 'Activity', tag: 'button' });
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// display the transaction status
|
// display the transaction status
|
||||||
|
@ -267,13 +267,10 @@ describe('MetaMask Import UI', function () {
|
|||||||
await driver.clickElement({ text: 'Remove', tag: 'button' });
|
await driver.clickElement({ text: 'Remove', tag: 'button' });
|
||||||
|
|
||||||
// Wait until selected account switches away from removed account to first account
|
// Wait until selected account switches away from removed account to first account
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector({
|
||||||
{
|
|
||||||
css: '.selected-account__name',
|
css: '.selected-account__name',
|
||||||
text: 'Account 1',
|
text: 'Account 1',
|
||||||
},
|
});
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
|
||||||
|
|
||||||
await driver.delay(regularDelayMs);
|
await driver.delay(regularDelayMs);
|
||||||
await driver.clickElement('.account-menu__icon');
|
await driver.clickElement('.account-menu__icon');
|
||||||
|
@ -163,13 +163,10 @@ describe('MetaMask Responsive UI', function () {
|
|||||||
return confirmedTxes.length === 1;
|
return confirmedTxes.length === 1;
|
||||||
}, 10000);
|
}, 10000);
|
||||||
|
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector({
|
||||||
{
|
|
||||||
css: '.transaction-list-item__primary-currency',
|
css: '.transaction-list-item__primary-currency',
|
||||||
text: '-1 ETH',
|
text: '-1 ETH',
|
||||||
},
|
});
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -136,13 +136,10 @@ describe('Navigate transactions', function () {
|
|||||||
const windowHandles = await driver.getAllWindowHandles();
|
const windowHandles = await driver.getAllWindowHandles();
|
||||||
const extension = windowHandles[0];
|
const extension = windowHandles[0];
|
||||||
await driver.switchToWindow(extension);
|
await driver.switchToWindow(extension);
|
||||||
navigationElement = await driver.waitForSelector(
|
navigationElement = await driver.waitForSelector({
|
||||||
{
|
|
||||||
css: '.confirm-page-container-navigation',
|
css: '.confirm-page-container-navigation',
|
||||||
text: '2 of 5',
|
text: '2 of 5',
|
||||||
},
|
});
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
|
||||||
navigationText = await navigationElement.getText();
|
navigationText = await navigationElement.getText();
|
||||||
assert.equal(
|
assert.equal(
|
||||||
navigationText.includes('2 of 5'),
|
navigationText.includes('2 of 5'),
|
||||||
@ -169,13 +166,10 @@ describe('Navigate transactions', function () {
|
|||||||
|
|
||||||
// reject transaction
|
// reject transaction
|
||||||
await driver.clickElement({ text: 'Reject', tag: 'button' });
|
await driver.clickElement({ text: 'Reject', tag: 'button' });
|
||||||
const navigationElement = await driver.waitForSelector(
|
const navigationElement = await driver.waitForSelector({
|
||||||
{
|
|
||||||
css: '.confirm-page-container-navigation',
|
css: '.confirm-page-container-navigation',
|
||||||
text: '1 of 3',
|
text: '1 of 3',
|
||||||
},
|
});
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
|
||||||
const navigationText = await navigationElement.getText();
|
const navigationText = await navigationElement.getText();
|
||||||
assert.equal(
|
assert.equal(
|
||||||
navigationText.includes('1 of 3'),
|
navigationText.includes('1 of 3'),
|
||||||
@ -202,13 +196,10 @@ describe('Navigate transactions', function () {
|
|||||||
|
|
||||||
// confirm transaction
|
// confirm transaction
|
||||||
await driver.clickElement({ text: 'Confirm', tag: 'button' });
|
await driver.clickElement({ text: 'Confirm', tag: 'button' });
|
||||||
const navigationElement = await driver.waitForSelector(
|
const navigationElement = await driver.waitForSelector({
|
||||||
{
|
|
||||||
css: '.confirm-page-container-navigation',
|
css: '.confirm-page-container-navigation',
|
||||||
text: '1 of 3',
|
text: '1 of 3',
|
||||||
},
|
});
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
|
||||||
const navigationText = await navigationElement.getText();
|
const navigationText = await navigationElement.getText();
|
||||||
assert.equal(
|
assert.equal(
|
||||||
navigationText.includes('1 of 3'),
|
navigationText.includes('1 of 3'),
|
||||||
|
@ -57,13 +57,10 @@ describe('Personal sign', function () {
|
|||||||
const verifySigUtil = await driver.findElement(
|
const verifySigUtil = await driver.findElement(
|
||||||
'#personalSignVerifySigUtilResult',
|
'#personalSignVerifySigUtilResult',
|
||||||
);
|
);
|
||||||
const verifyECRecover = await driver.waitForSelector(
|
const verifyECRecover = await driver.waitForSelector({
|
||||||
{
|
|
||||||
css: '#personalSignVerifyECRecoverResult',
|
css: '#personalSignVerifyECRecoverResult',
|
||||||
text: publicAddress,
|
text: publicAddress,
|
||||||
},
|
});
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
|
||||||
assert.equal(await verifySigUtil.getText(), publicAddress);
|
assert.equal(await verifySigUtil.getText(), publicAddress);
|
||||||
assert.equal(await verifyECRecover.getText(), publicAddress);
|
assert.equal(await verifyECRecover.getText(), publicAddress);
|
||||||
},
|
},
|
||||||
|
@ -196,13 +196,10 @@ describe('Send ETH from inside MetaMask using advanced gas modal', function () {
|
|||||||
return confirmedTxes.length === 1;
|
return confirmedTxes.length === 1;
|
||||||
}, 10000);
|
}, 10000);
|
||||||
|
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector({
|
||||||
{
|
|
||||||
css: '.transaction-list-item__primary-currency',
|
css: '.transaction-list-item__primary-currency',
|
||||||
text: '-1 ETH',
|
text: '-1 ETH',
|
||||||
},
|
});
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -275,7 +272,6 @@ describe('Send ETH from dapp using advanced gas controls', function () {
|
|||||||
await driver.clickElement('[data-testid="home__activity-tab"]');
|
await driver.clickElement('[data-testid="home__activity-tab"]');
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
);
|
||||||
await driver.waitForSelector({
|
await driver.waitForSelector({
|
||||||
css: '.transaction-list-item__primary-currency',
|
css: '.transaction-list-item__primary-currency',
|
||||||
@ -345,7 +341,6 @@ describe('Send ETH from dapp using advanced gas controls', function () {
|
|||||||
await driver.clickElement('[data-testid="home__activity-tab"]');
|
await driver.clickElement('[data-testid="home__activity-tab"]');
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
);
|
||||||
await driver.waitForSelector({
|
await driver.waitForSelector({
|
||||||
css: '.transaction-list-item__primary-currency',
|
css: '.transaction-list-item__primary-currency',
|
||||||
|
@ -168,7 +168,6 @@ describe('Send ERC20 to a 40 character hexadecimal address', function () {
|
|||||||
await driver.clickElement('[data-testid="home__activity-tab"]');
|
await driver.clickElement('[data-testid="home__activity-tab"]');
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
);
|
||||||
const sendTransactionListItem = await driver.waitForSelector(
|
const sendTransactionListItem = await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
||||||
@ -234,7 +233,6 @@ describe('Send ERC20 to a 40 character hexadecimal address', function () {
|
|||||||
await driver.clickElement('[data-testid="home__activity-tab"]');
|
await driver.clickElement('[data-testid="home__activity-tab"]');
|
||||||
await driver.waitForSelector(
|
await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
||||||
{ timeout: 10000 },
|
|
||||||
);
|
);
|
||||||
const sendTransactionListItem = await driver.waitForSelector(
|
const sendTransactionListItem = await driver.waitForSelector(
|
||||||
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
'.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)',
|
||||||
|
Loading…
Reference in New Issue
Block a user