Skip to content

Commit

Permalink
Update metamask.js
Browse files Browse the repository at this point in the history
  • Loading branch information
r3kt-eth authored May 14, 2023
1 parent b1ce762 commit 8ea3d6b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions commands/metamask.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,10 @@ const metamask = {
return true;
},
async createAccount(accountName) {
if (accountName) {
accountName = accountName.toLowerCase();
}
await switchToMetamaskIfNotActive();
await module.exports.goToNewAccount();
if (accountName) {
accountName = accountName.toLowerCase();
await playwright.waitAndType(
mainPageElements.createAccount.input,
accountName,
Expand All @@ -350,7 +348,7 @@ const metamask = {
const accountExists = 'This account name already exists' === formErrorTxt;

if (accountExists) {
log(`[error] ${formErrorTxt}`);
log(`[createAccount] ${formErrorTxt}`);
await playwright.waitAndClick(
mainPageElements.createAccount.cancelButton,
);
Expand Down

0 comments on commit 8ea3d6b

Please sign in to comment.