-
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.
- Loading branch information
Showing
11 changed files
with
76 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,28 @@ | ||
import { DEFAULT_SESSION_PARAMS } from './shared/constants' | ||
import { testMW } from './shared/fixtures/w3m-wallet-fixture' | ||
|
||
// Initialize the connection | ||
testMW.beforeEach(async ({ modalPage, walletPage }) => { | ||
await modalPage.copyConnectUriToClipboard() | ||
await walletPage.connect() | ||
await walletPage.handleSessionProposal(DEFAULT_SESSION_PARAMS) | ||
}) | ||
|
||
testMW('Should connect', async ({ modalValidator, walletValidator }) => { | ||
await modalValidator.expectConnected() | ||
await walletValidator.expectConnected() | ||
testMW.afterEach(async ({ modalPage, modalValidator, walletValidator }) => { | ||
await modalPage.disconnect() | ||
await modalValidator.expectDisconnected() | ||
await walletValidator.expectDisconnected() | ||
}) | ||
|
||
testMW( | ||
'Should connect and sign', | ||
async ({ modalPage, walletPage, modalValidator, walletValidator }) => { | ||
await modalValidator.expectConnected() | ||
await walletValidator.expectConnected() | ||
|
||
// Sign | ||
await modalPage.sign() | ||
await walletValidator.expectRecievedSign({}) | ||
await walletPage.handleRequest({ accept: true }) | ||
await modalValidator.expectAcceptedSign() | ||
} | ||
) |
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
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