Skip to content

Commit

Permalink
feature(17901): fix import UI error (#19372)
Browse files Browse the repository at this point in the history
  • Loading branch information
DDDDDanica authored Jun 5, 2023
1 parent 3b9e2eb commit 16e07b5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/e2e/tests/from-import-ui.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 16e07b5

Please sign in to comment.