mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Make Edit Gas Fee testcase independent of arbitrary Wait time for Gas Editing (#13888)
* Added Wait for Element Containing certain value function and made more robust Edit-Gas-Fee test * Fix: changed wait for containing value and included extra waitforelements * Fix: fix lint issue
This commit is contained in:
parent
85385233e5
commit
21c30f74af
@ -40,9 +40,11 @@ describe('Editing Confirm Transaction', function () {
|
||||
|
||||
// update estimates to high
|
||||
await driver.clickElement('[data-testid="edit-gas-fee-button"]');
|
||||
await driver.delay(regularDelayMs);
|
||||
await driver.waitForSelector({
|
||||
text: 'sec',
|
||||
tag: 'span',
|
||||
});
|
||||
await driver.clickElement('[data-testid="edit-gas-fee-item-high"]');
|
||||
await driver.delay(regularDelayMs);
|
||||
await driver.waitForSelector({ text: '🦍' });
|
||||
await driver.waitForSelector({
|
||||
text: 'Aggressive',
|
||||
@ -50,9 +52,7 @@ describe('Editing Confirm Transaction', function () {
|
||||
|
||||
// update estimates to medium
|
||||
await driver.clickElement('[data-testid="edit-gas-fee-button"]');
|
||||
await driver.delay(regularDelayMs);
|
||||
await driver.clickElement('[data-testid="edit-gas-fee-item-medium"]');
|
||||
await driver.delay(regularDelayMs);
|
||||
await driver.waitForSelector({ text: '🦊' });
|
||||
await driver.waitForSelector({
|
||||
text: 'Market',
|
||||
@ -60,9 +60,7 @@ describe('Editing Confirm Transaction', function () {
|
||||
|
||||
// update estimates to low
|
||||
await driver.clickElement('[data-testid="edit-gas-fee-button"]');
|
||||
await driver.delay(regularDelayMs);
|
||||
await driver.clickElement('[data-testid="edit-gas-fee-item-low"]');
|
||||
await driver.delay(regularDelayMs);
|
||||
await driver.waitForSelector({ text: '🐢' });
|
||||
await driver.waitForSelector({
|
||||
text: 'Low',
|
||||
@ -121,7 +119,10 @@ describe('Editing Confirm Transaction', function () {
|
||||
|
||||
// update estimates to high
|
||||
await driver.clickElement('[data-testid="edit-gas-fee-button"]');
|
||||
await driver.delay(regularDelayMs);
|
||||
await driver.waitForSelector({
|
||||
text: 'sec',
|
||||
tag: 'span',
|
||||
});
|
||||
await driver.clickElement('[data-testid="edit-gas-fee-item-custom"]');
|
||||
await driver.delay(regularDelayMs);
|
||||
|
||||
@ -231,7 +232,10 @@ describe('Editing Confirm Transaction', function () {
|
||||
});
|
||||
|
||||
await driver.clickElement('[data-testid="edit-gas-fee-button"]');
|
||||
await driver.delay(regularDelayMs);
|
||||
await driver.waitForSelector({
|
||||
text: 'sec',
|
||||
tag: 'span',
|
||||
});
|
||||
await driver.clickElement(
|
||||
'[data-testid="edit-gas-fee-item-dappSuggested"]',
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user