Files
web2.0-frontend/tests/playwright/signup.test.ts
T
2023-10-03 20:59:42 +03:00

20 lines
835 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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);
});