-
-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix crash on
/user/[username]
route due to browser support iss…
…ue (#1580)
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { test, expect } from "@playwright/test"; | ||
|
||
test("Open a User (with GitHub Account Connected) Profile", async ({ page }) => { | ||
await page.goto("/user/babblebey", { waitUntil: "domcontentloaded" }); | ||
|
||
await expect(page).toHaveURL(/\/user\/babblebey/, { timeout: 10000 }); | ||
await expect(page).toHaveTitle(/babblebey | OpenSauced/); | ||
await expect(page.getByRole("heading", { name: "babblebey" })).toBeVisible(); | ||
await expect(page.getByRole("img", { name: "Avatar" })).toBeVisible(); | ||
await expect(page.getByRole("img", { name: "user profile cover image" })).toBeVisible(); | ||
await expect(page.getByRole("link", { name: "Get Card" })).toBeVisible(); | ||
await expect(page.getByRole("button", { name: "Share" })).toBeVisible(); | ||
await expect(page.getByRole("tab")).toBeVisible(); | ||
}); | ||
|
||
test("Open a User (without Github Account Connected) Profile", async ({ page }) => { | ||
await page.goto("/user/githubuser", { waitUntil: "domcontentloaded" }); | ||
|
||
await expect(page).toHaveURL("/user/githubuser", { timeout: 10000 }); | ||
await expect(page).toHaveTitle(/githubuser | OpenSauced/); | ||
await expect(page.getByRole("heading", { name: "githubuser" })).toBeVisible(); | ||
await expect(page.getByRole("img", { name: "Avatar" })).toBeHidden(); | ||
await expect(page.getByRole("img", { name: "user profile cover image" })).toBeHidden(); | ||
await expect(page.getByRole("link", { name: "Get Card" })).toBeHidden(); | ||
await expect(page.getByRole("button", { name: "Share" })).toBeHidden(); | ||
await expect(page.getByRole("tab")).toBeHidden(); | ||
await expect(page.getByRole("heading", { name: "Contribution Insights" })).toBeVisible(); | ||
}); |