sendou.ink/e2e/tournament-tiers.spec.ts
Kalle 2b5b1b1948
Some checks are pending
E2E Tests / e2e (push) Waiting to run
Tests and checks on push / run-checks-and-tests (push) Waiting to run
Updates translation progress / update-translation-progress-issue (push) Waiting to run
New match page (#3032)
2026-05-04 18:15:10 +03:00

38 lines
1014 B
TypeScript

import { calendarPage, tournamentBracketsPage } from "~/utils/urls";
import {
expect,
impersonate,
navigate,
seed,
submit,
test,
} from "./helpers/playwright";
test.describe("Tournament tiers", () => {
test("shows tentative tier before bracket starts and confirmed tier after", async ({
page,
}) => {
await seed(page);
await navigate({ page, url: calendarPage() });
const picnicCard = page
.getByTestId("tournament-card")
.filter({ hasText: "PICNIC" });
await expect(picnicCard.getByTestId("tentative-tier")).toBeVisible();
await impersonate(page);
await navigate({ page, url: tournamentBracketsPage({ tournamentId: 1 }) });
await page.getByTestId("finalize-bracket-button").click();
await submit(page, "confirm-finalize-bracket-button");
await navigate({ page, url: calendarPage() });
const picnicCardAfter = page
.getByTestId("tournament-card")
.filter({ hasText: "PICNIC" });
await expect(picnicCardAfter.getByTestId("confirmed-tier")).toBeVisible();
});
});