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