import { test, expect, } from "@playwright/test"; const NAME = "Testi Testeri"; const EMAIL = "e2e@sahkoinsinoorikilta.fi"; test("signup to event", async ({ page }) => { await page.goto("/"); await page.locator("[id=\"\\#events\"]").getByRole("button", { name: "Lue lisää ›" }).first().click(); await page.locator("button").filter({ hasText: "Finland flag" }).click(); await page.getByRole("button", { name: "Test" }).click(); await page.getByLabel("Nimi*").fill(NAME); await page.getByLabel("S-Posti*").fill(EMAIL); await page.locator("label").filter({ hasText: "Testaaja" }).locator("span").click(); await page.getByRole("button", { name: "Submit" }).click(); // await expect(page.getByText("Sign-up submitted successfully 😎")).toBeVisible(); await expect(page.getByRole("list")).toHaveText(NAME); });