1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

Mitigate flaky test with the use of new function (#16655)

This commit is contained in:
seaona 2022-11-24 19:10:07 +01:00 committed by GitHub
parent 6dddd246d1
commit 6c00785271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -293,18 +293,13 @@ describe('Stores custom RPC history', function () {
await driver.clickElement('.btn-danger');
// wait for confirm delete modal to be visible
const confirmDeleteModal = await driver.findVisibleElement(
'span .modal',
);
await driver.findVisibleElement('span .modal');
await driver.clickElement(
'.button.btn-danger-primary.modal-container__footer-button',
);
if (await driver.isElementPresent('span .modal')) {
// wait for confirm delete modal to be removed from DOM.
await confirmDeleteModal.waitForElementState('hidden');
}
await driver.waitForElementNotPresent('span .modal');
const newNetworkListItems = await driver.findElements(
'.networks-tab__networks-list-name',