Files

18 lines
642 B
TypeScript

import { test, expect } from "@playwright/test";
test("user can login", async ({ page }) => {
await page.goto("/c");
await page.getByPlaceholder("[email protected]").click();
await page.getByPlaceholder("[email protected]").fill("Administrator");
await page.getByPlaceholder("[email protected]").press("Tab");
await page.getByPlaceholder("••••••").fill("admin");
await page.getByRole("button", { name: "Log In" }).click();
const dashboardLink = await page.getByText("Dashboard");
const accountLink = await page.getByText("Account");
expect(dashboardLink).toBeDefined();
expect(accountLink).toBeDefined();
});