From 6c007852712b1b4bda979329fd1841c6d4df4b42 Mon Sep 17 00:00:00 2001 From: seaona <54408225+seaona@users.noreply.github.com> Date: Thu, 24 Nov 2022 19:10:07 +0100 Subject: [PATCH] Mitigate flaky test with the use of new function (#16655) --- test/e2e/tests/custom-rpc-history.spec.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/e2e/tests/custom-rpc-history.spec.js b/test/e2e/tests/custom-rpc-history.spec.js index 534c8ef25..f0580c69d 100644 --- a/test/e2e/tests/custom-rpc-history.spec.js +++ b/test/e2e/tests/custom-rpc-history.spec.js @@ -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',