Skip to content

Commit

Permalink
Merge branch 'V4' into chore/wallet-search-optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaisailovic committed Apr 23, 2024
2 parents 8a429b6 + 23893fc commit 5aec180
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
4 changes: 0 additions & 4 deletions apps/laboratory/tests/email.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,14 @@ testMEmail('it should switch network and sign', async ({ modalPage, modalValidat
await modalPage.switchNetwork(targetChain)
await modalValidator.expectNetwork(targetChain)
await modalPage.closeModal()
await modalPage.page.waitForTimeout(1500)
await modalPage.sign()
await modalPage.approveSign()
await modalValidator.expectAcceptedSign()

await modalPage.page.waitForTimeout(2000)

targetChain = 'Ethereum'
await modalPage.switchNetwork(targetChain)
await modalValidator.expectNetwork(targetChain)
await modalPage.closeModal()
await modalPage.page.waitForTimeout(1500)
await modalPage.sign()
await modalPage.approveSign()
await modalValidator.expectAcceptedSign()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const testModalSmartAccount = base.extend<ModalFixture & { slowModalPage:
await modalPage.openSettings()
await modalPage.switchNetwork('Sepolia')
await modalPage.closeModal()
await modalPage.page.waitForTimeout(1500)
await use(modalPage)
},
{ timeout: 90_000 }
Expand Down
4 changes: 2 additions & 2 deletions apps/laboratory/tests/shared/pages/ModalPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ export class ModalPage {
await this.page.getByTestId('account-button').click()
await this.page.getByTestId('w3m-account-select-network').click()
await this.page.getByTestId(`w3m-network-switch-${network}`).click()
// Network switch might take a second or two
await this.page.waitForTimeout(2000)
}

async clickWalletDeeplink() {
Expand All @@ -226,5 +224,7 @@ export class ModalPage {

async closeModal() {
await this.page.getByTestId('w3m-header-close')?.click?.()
// Wait for the modal fade out animation
await this.page.waitForTimeout(300)
}
}
3 changes: 0 additions & 3 deletions apps/laboratory/tests/smart-account.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ testModalSmartAccount(
await walletModalValidator.expectChangePreferredAccountToShow(EOA)

await walletModalPage.closeModal()
await walletModalPage.page.waitForTimeout(1000)

await walletModalPage.sign()
await walletModalPage.approveSign()
Expand All @@ -59,7 +58,6 @@ testModalSmartAccount(
await walletModalPage.switchNetwork('Avalanche')
await walletModalValidator.expectTogglePreferredTypeVisible(false)
await walletModalPage.closeModal()
await walletModalPage.page.waitForTimeout(1000)

await walletModalPage.openAccount()
await walletModalValidator.expectActivateSmartAccountPromoVisible(false)
Expand Down Expand Up @@ -94,7 +92,6 @@ testModalSmartAccount(
await walletModalPage.switchNetwork('Sepolia')
await walletModalValidator.expectTogglePreferredTypeVisible(false)
await walletModalPage.closeModal()
await walletModalPage.page.waitForTimeout(1000)

await walletModalPage.openAccount()
await walletModalValidator.expectActivateSmartAccountPromoVisible(false)
Expand Down

0 comments on commit 5aec180

Please sign in to comment.