-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from argentlabs/ax0-tests-sign-and-tx
chore: add argent-x tests for signMessage and transaction
- Loading branch information
Showing
14 changed files
with
364 additions
and
134 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
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { expect } from "@playwright/test" | ||
|
||
import test from "../test" | ||
import config from "../../../config" | ||
|
||
test.describe("Connect", () => { | ||
|
||
for (const useStarknetKitModal of [true, false] as const) { | ||
test(`connect from testDapp using starknetKitModal ${useStarknetKitModal}`, async ({ | ||
extension, | ||
browserContext, | ||
}) => { | ||
//setup wallet | ||
await extension.open() | ||
await extension.recoverWallet(config.testSeed3!) | ||
await expect(extension.network.networkSelector).toBeVisible() | ||
await extension.network.selectDefaultNetwork() | ||
|
||
await extension.dapps.requestConnectionFromDapp({ | ||
browserContext, | ||
useStarknetKitModal, | ||
}) | ||
|
||
//accept connection from Argent X | ||
await extension.dapps.accept.click() | ||
//check connect dapps | ||
await extension.navigation.showSettingsLocator.click() | ||
await extension.settings.account(extension.account.accountName1).click() | ||
await extension.page | ||
.getByRole("button", { name: "Connected dapps" }) | ||
.click() | ||
|
||
await expect(extension.dapps.connected()).toBeVisible() | ||
//disconnect dapp from Argent X | ||
await extension.dapps.disconnect().click() | ||
await expect(extension.dapps.connected()).toBeHidden() | ||
await extension.page | ||
.getByRole("button", { name: "Connected dapps" }) | ||
.click() | ||
await expect( | ||
extension.page.getByRole("heading", { name: "No authorised dapps" }), | ||
).toBeVisible() | ||
}) | ||
} | ||
}) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.