sendou.ink/e2e/lfg.spec.ts
Kalle 4beb2bdfdd
LFG (#1732)
* Initial

* Can post new

* Load team

* seed + loader posts

* LFGPost render initial

* More UI work

* Tiers

* sticky left

* Mobile

* new.tsx work

* TeamLFGPost component initial

* Full team member list

* Add TODO

* Delete post action

* Edit post etc.

* Delete team posts when team disbands

* Prevent adding same post type twice in UI

* Post expiry logic

* Fix layout shift

* Filters initial

* Progress

* Weapon filtered implemented

* Weapon alt kits in filtering

* + visibility

* i18n

* E2E test

* Team = null
2024-05-19 13:43:59 +03:00

25 lines
683 B
TypeScript

import test, { expect } from "@playwright/test";
import { impersonate, navigate, seed, submit } from "~/utils/playwright";
import { LFG_PAGE } from "~/utils/urls";
test.describe("LFG", () => {
test("adds a new lfg post", async ({ page }) => {
await seed(page);
await impersonate(page);
await navigate({
page,
url: LFG_PAGE,
});
await page.getByTestId("add-new-button").click();
await page.getByLabel("Text").fill("looking for a cool team");
await submit(page);
// got redirected
await expect(page.getByTestId("add-new-button")).toBeVisible();
await expect(page.getByText("looking for a cool team")).toBeVisible();
});
});