-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Guild Pin minting E2E test (#1413)
* feat: use wagmi's mock connector & add Guild Pin minting test * fix: provide environment variables in the gh action * fix(gh action): install foundry * fix: simplify guild pin spec
- Loading branch information
1 parent
bd0ca4b
commit 2d35c26
Showing
15 changed files
with
286 additions
and
427 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
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 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,29 @@ | ||
import { expect } from "@playwright/test" | ||
import { GUILD_CHECKOUT_TEST_GUILD_URL_NAME } from "./constants" | ||
import { test } from "./fixtures" | ||
|
||
test("can mint guild pin", async ({ pageWithKeyPair: { page } }) => { | ||
await page.goto(GUILD_CHECKOUT_TEST_GUILD_URL_NAME) | ||
|
||
await page.waitForResponse("**/v2/users/*/memberships?guildId=*") | ||
|
||
const mintGuildPinButton = await page.getByTestId("mint-guild-pin-button") | ||
await mintGuildPinButton.click() | ||
|
||
const mintGuildPinDialog = await page.getByRole("dialog", { | ||
name: "Mint Guild Pin", | ||
}) | ||
await expect(mintGuildPinDialog).toBeVisible() | ||
|
||
const feeText = await page.getByTestId("guild-pin-fee") | ||
await expect(feeText).toContainText("0.001 ETH") | ||
|
||
const bigMintGuildPinButton = await page.getByTestId("big-mint-guild-pin-button") | ||
await expect(bigMintGuildPinButton).toBeEnabled() | ||
await bigMintGuildPinButton.click() | ||
|
||
await page.waitForResponse("**/v2/guilds/*/pin") | ||
|
||
const successToast = await page.getByText("Successfully minted Guild Pin!") | ||
await expect(successToast).toBeVisible({ timeout: 30_000 }) | ||
}) |
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,4 +1,8 @@ | ||
export const TEST_USER = { | ||
id: 953897, | ||
address: "0x304def656babc745c53782639d3cab00ace8c843", | ||
id: 6051234, | ||
address: "0xcb03d1acd17abaf5c6019da30c9e652bdbed459f", | ||
} as const | ||
|
||
export const GUILD_CHECKOUT_TEST_GUILD_URL_NAME = "guild-checkout-e2e" | ||
|
||
export const TEST_GUILD_URL_NAME = "guild-e2e" |
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
2 changes: 1 addition & 1 deletion
2
src/v2/components/Web3ConnectionManager/Web3ConnectionManager.tsx
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
Oops, something went wrong.