mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix flaky account removal e2e test (#12607)
* Add delay to fix flaky account removal e2e test * Await for element to update instead of awaiting an arbitrary delay * Update test/e2e/tests/from-import-ui.spec.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * code formatting * Remove redundant code Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: PeterYinusa <peter.yinusa@consensys.net>
This commit is contained in:
parent
a49a40fbbb
commit
a13d8583a0
@ -233,10 +233,15 @@ describe('Metamask Import UI', function () {
|
||||
// should remove the account
|
||||
await driver.clickElement({ text: 'Remove', tag: 'button' });
|
||||
|
||||
const currentActiveAccountName = await driver.findElement(
|
||||
'.selected-account__name',
|
||||
// Wait until selected account switches away from removed account to first account
|
||||
await driver.waitForSelector(
|
||||
{
|
||||
css: '.selected-account__name',
|
||||
text: 'Account 1',
|
||||
},
|
||||
{ timeout: 10000 },
|
||||
);
|
||||
assert.equal(await currentActiveAccountName.getText(), 'Account 1');
|
||||
|
||||
await driver.delay(regularDelayMs);
|
||||
await driver.clickElement('.account-menu__icon');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user