Skip to content

Commit 9215996

Browse files
committed
chore: lint fix
1 parent aaded72 commit 9215996

File tree

2 files changed

+45
-35
lines changed

2 files changed

+45
-35
lines changed

test/e2e/page-objects/pages/wallet-details-page.ts

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,58 @@ class WalletDetailsPage {
55

66
private readonly walletDetailsPage = '.wallet-details-page';
77

8-
private readonly addAccountButton = '.wallet-details-page__add-account-button';
8+
private readonly addAccountButton =
9+
'.wallet-details-page__add-account-button';
910

1011
private readonly accountTypeModal = '.multichain-account-menu-popover';
1112

12-
private readonly ethereumAccountOption = { text: 'Ethereum account', tag: 'button' };
13+
private readonly ethereumAccountOption = {
14+
text: 'Ethereum account',
15+
tag: 'button',
16+
};
1317

14-
private readonly solanaAccountOption = { text: 'Solana account', tag: 'button' };
18+
private readonly solanaAccountOption = {
19+
text: 'Solana account',
20+
tag: 'button',
21+
};
1522

16-
private readonly accountItems = '[data-testid^="wallet-details-account-item-"]';
23+
private readonly accountItems =
24+
'[data-testid^="wallet-details-account-item-"]';
1725

1826
constructor(driver: Driver) {
1927
this.driver = driver;
2028
}
2129

22-
async check_pageIsLoaded(): Promise<void> {
30+
async checkPageIsLoaded(): Promise<void> {
2331
console.log('Check wallet details page is loaded');
2432
await this.driver.waitForSelector(this.walletDetailsPage);
2533
}
2634

27-
async check_walletNameIsDisplayed(walletName: string): Promise<void> {
35+
async checkWalletNameIsDisplayed(walletName: string): Promise<void> {
2836
console.log(`Check wallet name "${walletName}" is displayed`);
2937
await this.driver.waitForSelector({
3038
text: walletName,
31-
tag: 'p'
39+
tag: 'p',
3240
});
3341
}
3442

35-
async check_balanceIsDisplayed(balance: string): Promise<void> {
43+
async checkBalanceIsDisplayed(balance: string): Promise<void> {
3644
console.log(`Check balance "${balance}" is displayed`);
3745
await this.driver.waitForSelector({
3846
text: balance,
39-
tag: 'span'
47+
tag: 'span',
4048
});
4149
}
4250

43-
async check_accountIsDisplayed(accountName: string): Promise<void> {
51+
async checkAccountIsDisplayed(accountName: string): Promise<void> {
4452
console.log(`Check account "${accountName}" is displayed`);
4553
await this.driver.waitForSelector({
4654
text: accountName,
47-
tag: 'p'
48-
});
55+
tag: 'p',
56+
});
4957
}
5058

51-
async check_addAccountButtonIsDisplayed(): Promise<void> {
59+
async checkAddAccountButtonIsDisplayed(): Promise<void> {
5260
console.log('Check add account button is displayed');
5361
await this.driver.waitForSelector(this.addAccountButton);
5462
}
@@ -58,17 +66,17 @@ class WalletDetailsPage {
5866
await this.driver.clickElement(this.addAccountButton);
5967
}
6068

61-
async check_accountTypeModalIsDisplayed(): Promise<void> {
69+
async checkAccountTypeModalIsDisplayed(): Promise<void> {
6270
console.log('Check account type selection modal is displayed');
6371
await this.driver.waitForSelector(this.accountTypeModal);
6472
}
6573

66-
async check_ethereumAccountOptionIsDisplayed(): Promise<void> {
74+
async checkEthereumAccountOptionIsDisplayed(): Promise<void> {
6775
console.log('Check Ethereum account option is displayed');
6876
await this.driver.waitForSelector(this.ethereumAccountOption);
6977
}
7078

71-
async check_solanaAccountOptionIsDisplayed(): Promise<void> {
79+
async checkSolanaAccountOptionIsDisplayed(): Promise<void> {
7280
console.log('Check Solana account option is displayed');
7381
await this.driver.waitForSelector(this.solanaAccountOption);
7482
}
@@ -78,13 +86,17 @@ class WalletDetailsPage {
7886
await this.driver.clickElement(this.ethereumAccountOption);
7987
}
8088

81-
async check_numberOfAccountsDisplayed(expectedCount: number): Promise<void> {
89+
async checkNumberOfAccountsDisplayed(expectedCount: number): Promise<void> {
8290
console.log(`Check ${expectedCount} accounts are displayed`);
83-
const accountItemElements = await this.driver.findElements(this.accountItems);
91+
const accountItemElements = await this.driver.findElements(
92+
this.accountItems,
93+
);
8494
if (accountItemElements.length !== expectedCount) {
85-
throw new Error(`Expected ${expectedCount} accounts, but found ${accountItemElements.length}`);
95+
throw new Error(
96+
`Expected ${expectedCount} accounts, but found ${accountItemElements.length}`,
97+
);
8698
}
8799
}
88100
}
89101

90-
export default WalletDetailsPage;
102+
export default WalletDetailsPage;

test/e2e/tests/multichain-accounts/multichain-wallet-details.spec.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ import HomePage from '../../page-objects/pages/home/homepage';
99
import FixtureBuilder from '../../fixture-builder';
1010
import { loginWithBalanceValidation } from '../../page-objects/flows/login.flow';
1111
import { ACCOUNT_TYPE } from '../../constants';
12-
import {
13-
mockMultichainAccountsFeatureFlag,
14-
} from './common';
12+
import { mockMultichainAccountsFeatureFlag } from './common';
1513

1614
describe('Multichain Accounts - Wallet Details', function (this: Suite) {
1715
it('should view wallet details with one Ethereum and one Solana account and show SRP backup reminder', async function () {
@@ -65,12 +63,12 @@ describe('Multichain Accounts - Wallet Details', function (this: Suite) {
6563
await accountListPage.clickWalletDetailsButton();
6664

6765
const walletDetailsPage = new WalletDetailsPage(driver);
68-
await walletDetailsPage.check_pageIsLoaded();
66+
await walletDetailsPage.checkPageIsLoaded();
6967

70-
await walletDetailsPage.check_walletNameIsDisplayed('Wallet 1');
71-
await walletDetailsPage.check_balanceIsDisplayed('$42,500.00');
72-
await walletDetailsPage.check_accountIsDisplayed('Account 1');
73-
await walletDetailsPage.check_accountIsDisplayed('Solana Account 1');
68+
await walletDetailsPage.checkWalletNameIsDisplayed('Wallet 1');
69+
await walletDetailsPage.checkBalanceIsDisplayed('$42,500.00');
70+
await walletDetailsPage.checkAccountIsDisplayed('Account 1');
71+
await walletDetailsPage.checkAccountIsDisplayed('Solana Account 1');
7472
},
7573
);
7674
});
@@ -123,19 +121,19 @@ describe('Multichain Accounts - Wallet Details', function (this: Suite) {
123121
await accountListPage.clickWalletDetailsButton();
124122

125123
const walletDetailsPage = new WalletDetailsPage(driver);
126-
await walletDetailsPage.check_pageIsLoaded();
124+
await walletDetailsPage.checkPageIsLoaded();
127125

128-
await walletDetailsPage.check_addAccountButtonIsDisplayed();
126+
await walletDetailsPage.checkAddAccountButtonIsDisplayed();
129127
await walletDetailsPage.clickAddAccountButton();
130128

131-
await walletDetailsPage.check_accountTypeModalIsDisplayed();
132-
await walletDetailsPage.check_ethereumAccountOptionIsDisplayed();
133-
await walletDetailsPage.check_solanaAccountOptionIsDisplayed();
129+
await walletDetailsPage.checkAccountTypeModalIsDisplayed();
130+
await walletDetailsPage.checkEthereumAccountOptionIsDisplayed();
131+
await walletDetailsPage.checkSolanaAccountOptionIsDisplayed();
134132

135133
await walletDetailsPage.clickEthereumAccountOption();
136134

137-
await walletDetailsPage.check_numberOfAccountsDisplayed(3);
135+
await walletDetailsPage.checkNumberOfAccountsDisplayed(3);
138136
},
139137
);
140138
});
141-
});
139+
});

0 commit comments

Comments
 (0)