sendou.ink/e2e/events.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

40 lines
1.1 KiB
TypeScript

import { EVENTS_PAGE } from "~/utils/urls";
import {
expect,
impersonate,
navigate,
seed,
test,
} from "./helpers/playwright";
test.describe("Events", () => {
test("filters between tabs and navigates to an event", async ({ page }) => {
await seed(page);
await impersonate(page);
await navigate({ page, url: EVENTS_PAGE });
await expect(page.getByText("My Events")).toBeVisible();
const eventLinks = page.getByRole("link").filter({ hasText: /.+/ });
await expect(eventLinks.first()).toBeVisible();
await page.getByRole("link", { name: /Scrims/ }).click();
await expect(
page.getByRole("link").filter({ hasText: /.+/ }).first(),
).toBeVisible();
await page.getByRole("link", { name: /Saved/ }).click();
await expect(page.getByText("No events in this category")).toBeVisible();
await page.getByRole("link", { name: /Hosting/ }).click();
const firstEventLink = page
.getByRole("link")
.filter({ hasText: /.+/ })
.first();
await expect(firstEventLink).toBeVisible();
await firstEventLink.click();
await expect(page).not.toHaveURL(/\/events/);
});
});