-
-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: repository page contributor graph defaults to enhance by defaul…
…t now (#3880)
- Loading branch information
1 parent
345aae2
commit 90948a5
Showing
2 changed files
with
22 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { test, expect } from "@playwright/test"; | ||
|
||
test("Loads a repository contributor page", async ({ page }) => { | ||
await page.goto("/s/open-sauced/app/contributors?range=30"); | ||
|
||
await expect(page.getByRole("heading", { name: "open-sauced/app", exact: true })).toBeVisible(); | ||
const rangePopup = page.getByRole("button", { name: "Range:", exact: true }); | ||
await expect(rangePopup).toBeVisible(); | ||
await expect(rangePopup).toHaveAttribute("aria-haspopup", "menu"); | ||
await expect(rangePopup).toHaveAttribute("data-state", "closed"); | ||
|
||
// The contributor page should have it's graph set to enhance by default and to not show bots by default. | ||
const enhanceSwitch = page.getByRole("switch", { name: "Enhance", exact: true }); | ||
await expect(enhanceSwitch).toBeVisible(); | ||
await expect(enhanceSwitch).toHaveAttribute("aria-checked", "true"); | ||
|
||
const showBotsSwitch = page.getByRole("switch", { name: "Show Bots", exact: true }); | ||
await expect(showBotsSwitch).toBeVisible(); | ||
await expect(showBotsSwitch).toHaveAttribute("aria-checked", "false"); | ||
}); |