-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: reset sa enabled networks (#2104)
- Loading branch information
Showing
12 changed files
with
124 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 17 additions & 45 deletions
62
apps/laboratory/tests/shared/fixtures/w3m-smart-account-fixture.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ import { testModalSmartAccount } from './shared/fixtures/w3m-smart-account-fixtu | |
import type { ModalWalletPage } from './shared/pages/ModalWalletPage' | ||
import type { ModalWalletValidator } from './shared/validators/ModalWalletValidator' | ||
|
||
const NOT_ENABLED_SMART_ACCOUNT_INDEX = 10 | ||
|
||
testModalSmartAccount.beforeEach(async ({ modalValidator }) => { | ||
await modalValidator.expectConnected() | ||
}) | ||
|
@@ -45,8 +47,26 @@ testModalSmartAccount( | |
const walletModalValidator = modalValidator as ModalWalletValidator | ||
|
||
await walletModalPage.togglePreferredAccountType() | ||
await walletModalPage.switchNetwork('Polygon') | ||
await walletModalPage.switchNetwork('Avalanche') | ||
await walletModalPage.openSettings() | ||
await walletModalValidator.expectEoaAddress(testInfo.parallelIndex) | ||
} | ||
) | ||
|
||
testModalSmartAccount( | ||
'it should use an eoa when disconnecting and connecting to a not enabled address', | ||
async ({ modalPage, modalValidator, context }) => { | ||
const walletModalPage = modalPage as ModalWalletPage | ||
const walletModalValidator = modalValidator as ModalWalletValidator | ||
|
||
await walletModalPage.togglePreferredAccountType() | ||
await walletModalPage.disconnect() | ||
await walletModalPage.page.waitForTimeout(2500) | ||
|
||
await walletModalPage.emailFlow('[email protected]', context) | ||
await walletModalPage.switchNetwork('Sepolia') | ||
await walletModalPage.openSettings() | ||
|
||
await walletModalValidator.expectEoaAddress(NOT_ENABLED_SMART_ACCOUNT_INDEX) | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters