Skip to content

Commit

Permalink
chore: scrolls selected network into view if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
tomiir committed Sep 5, 2024
1 parent fbe6222 commit d6c86fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion apps/laboratory/tests/shared/pages/ModalWalletPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export class ModalWalletPage extends ModalPage {

override async switchNetwork(network: string) {
await this.page.getByTestId('account-switch-network-button').click()
await this.page.getByTestId(`w3m-network-switch-${network}`).click()
const networkToSwitchButton = this.page.getByTestId(`w3m-network-switch-${network}`)
networkToSwitchButton.scrollIntoViewIfNeeded()
await networkToSwitchButton.click()
}

async togglePreferredAccountType() {
Expand Down
2 changes: 1 addition & 1 deletion apps/laboratory/tests/smart-account.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ smartAccountTest('it should switch to a not enabled network and sign with EOA',
})

smartAccountTest('it should switch to smart account and sign', async () => {
const targetChain = 'Arbitrum'
const targetChain = 'Polygon'
await page.goToSettings()
await page.switchNetwork(targetChain)
await validator.expectSwitchedNetwork(targetChain)
Expand Down

0 comments on commit d6c86fa

Please sign in to comment.