Skip to content

Commit

Permalink
feat: added code improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
javiergarciavera committed Dec 18, 2024
1 parent 27e9494 commit 9f2c743
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions test/e2e/page-objects/pages/account-list-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ class AccountListPage {
addAccountButton = this.addSolanaAccountButton;
break;
default:
console.log('Account type does not match with any of the options');
return;
throw new Error('Account type not supported');
}

await this.driver.clickElement(addAccountButton);
Expand Down Expand Up @@ -605,14 +604,10 @@ class AccountListPage {
const internalAccounts = await this.driver.findElements(
this.accountListItem,
);
const isValid = internalAccounts.length === expectedNumberOfAccounts;
console.log(
`Number of accounts: ${
internalAccounts.length
} is equal to ${expectedNumberOfAccounts}? ${
internalAccounts.length === expectedNumberOfAccounts
}`,
`Number of accounts: ${internalAccounts.length} is equal to ${expectedNumberOfAccounts}? ${isValid}`,
);
return internalAccounts.length === expectedNumberOfAccounts;
},
20000,
true,
Expand Down

0 comments on commit 9f2c743

Please sign in to comment.