1
0
Fork 0
polaris-task-force/tests/e2e/frontend.e2e.spec.ts
Z8MB1E f312b7b8f4 test(e2e): refresh frontend login and landing smoke tests
Enable baseURL in playwright config and replace the placeholder
homepage check with a landing-page test and a dev-user login flow.
2026-08-10 16:01:51 -04:00

21 lines
809 B
TypeScript

import { expect, test } from "@playwright/test";
test.describe("Frontend", () => {
test("guests see the landing page", async ({ page }) => {
await page.goto("/");
await expect(page).toHaveTitle(/Polaris Task Force/);
await expect(page.getByRole("heading", { level: 1 })).toHaveText("Polaris Task Force");
await expect(page.getByRole("link", { name: "Log in to access the portal" })).toBeVisible();
});
test("a user can log in and reach the dashboard", async ({ page }) => {
await page.goto("/login");
await page.getByLabel("Username").fill("dev");
await page.getByLabel("Password").fill("Test123");
await page.getByRole("button", { name: "Log in" }).click();
await expect(page.getByRole("heading", { level: 1 })).toHaveText("Welcome back, J. Fraley");
});
});