-
Notifications
You must be signed in to change notification settings - Fork 6
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
1 parent
a403477
commit fee4126
Showing
8 changed files
with
86 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ node_modules/ | |
/blob-report/ | ||
/playwright/.cache/ | ||
/dist | ||
.env |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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, test } from "@playwright/test"; | ||
import { installMockWallet } from "./../src/installMockWallet"; | ||
import { privateKeyToAccount } from "viem/accounts"; | ||
import { http, isHex } from "viem"; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await installMockWallet({ | ||
page, | ||
account: privateKeyToAccount( | ||
isHex(process.env.PRIVATE_KEY) ? process.env.PRIVATE_KEY : "0x", | ||
), | ||
transport: http(), | ||
}); | ||
}); | ||
|
||
test("talentir", async ({ page }) => { | ||
const baseUrl = "https://dev.talentir.com"; | ||
// const baseUrl = "http://localhost:3000"; | ||
await page.goto(baseUrl); | ||
|
||
await page.getByRole("button", { name: "Accept all" }).click(); | ||
await page.getByRole("button", { name: "Log In" }).click(); | ||
await page.getByRole("button", { name: "Choose Wallet" }).click(); | ||
await page.getByRole("menuitem", { name: "Mock Wallet" }).last().click(); | ||
|
||
await expect(page).toHaveURL(baseUrl + "/dashboard/assets"); | ||
await page.getByRole("link", { name: "Wallet" }).click(); | ||
|
||
await page.waitForTimeout(2000); | ||
|
||
await page.getByLabel("Transfer").click(); | ||
await page | ||
.getByPlaceholder("0xe0a942ff2e1724A2fe10627728bE327a43fE8C23") | ||
.fill("0xe0a942ff2e1724A2fe10627728bE327a43fE8C26"); | ||
|
||
await page.getByPlaceholder("-").fill("- 0.01"); | ||
|
||
await page.getByRole("button", { name: "Send USDC" }).click(); | ||
await page.getByLabel("I take full responsibility").click(); | ||
await page.getByRole("button", { name: "Confirm" }).click(); | ||
|
||
await expect( | ||
page.getByRole("heading", { name: "Transaction Successful" }), | ||
).toBeVisible({ timeout: 30000 }); | ||
}); |