From 16e07b5d7951059e134d0fea7b7f0ea5a3829686 Mon Sep 17 00:00:00 2001 From: Danica Shen Date: Mon, 5 Jun 2023 14:15:47 +0100 Subject: [PATCH] feature(17901): fix import UI error (#19372) --- test/e2e/tests/from-import-ui.spec.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/e2e/tests/from-import-ui.spec.js b/test/e2e/tests/from-import-ui.spec.js index d964b7b41..071f20cb6 100644 --- a/test/e2e/tests/from-import-ui.spec.js +++ b/test/e2e/tests/from-import-ui.spec.js @@ -200,10 +200,10 @@ describe('MetaMask Import UI', function () { await driver.clickElement('[data-testid="account-menu-icon"]'); await driver.clickElement({ text: 'Import account', tag: 'button' }); - // enter private key', - await driver.delay(regularDelayMs); + // enter private key + await driver.findClickableElement('#private-key-box'); await driver.fill('#private-key-box', testPrivateKey1); - await driver.delay(regularDelayMs); + await driver.findClickableElement({ text: 'Import', tag: 'button' }); await driver.clickElement({ text: 'Import', tag: 'button' }); // should show the correct account name @@ -229,7 +229,9 @@ describe('MetaMask Import UI', function () { // choose Create account from the account menu await driver.clickElement({ text: 'Import account', tag: 'button' }); // enter private key + await driver.findClickableElement('#private-key-box'); await driver.fill('#private-key-box', testPrivateKey2); + await driver.findClickableElement({ text: 'Import', tag: 'button' }); await driver.clickElement({ text: 'Import', tag: 'button' }); // should see new account in account menu @@ -354,8 +356,10 @@ describe('MetaMask Import UI', function () { await driver.clickElement('[data-testid="account-menu-icon"]'); await driver.clickElement({ text: 'Import account', tag: 'button' }); - // enter private key', + // enter private key + await driver.findClickableElement('#private-key-box'); await driver.fill('#private-key-box', testPrivateKey); + await driver.findClickableElement({ text: 'Import', tag: 'button' }); await driver.clickElement({ text: 'Import', tag: 'button' }); // error should occur