Skip to content

Commit

Permalink
feat: repository page contributor graph defaults to enhance by defaul…
Browse files Browse the repository at this point in the history
…t now (#3880)
  • Loading branch information
nickytonline authored Aug 7, 2024
1 parent 345aae2 commit 90948a5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/molecules/NivoScatterChart/nivo-scatter-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const NivoScatterPlot = ({
metadata,
handleSetPrFilter,
}: ScatterPlotProps) => {
const [showMembers, setShowMembers] = useState<boolean>(false);
const [isLogarithmic, setIsLogarithmic] = useState<boolean>(false);
const [showMembers, setShowMembers] = useState(false);
const [isLogarithmic, setIsLogarithmic] = useState(true);

let functionTimeout: any;

Expand Down
20 changes: 20 additions & 0 deletions e2e/repo-contributor-page.spec.ts
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");
});

0 comments on commit 90948a5

Please sign in to comment.