1
0
Fork 0
polaris-task-force/tests/e2e/frontend.e2e.spec.ts
2025-10-24 02:07:13 -04:00

20 lines
542 B
TypeScript

import { expect, Page, test } from "@playwright/test";
test.describe("Frontend", () => {
let page: Page;
test.beforeAll(async ({ browser }, testInfo) => {
const context = await browser.newContext();
page = await context.newPage();
});
test("can go on homepage", async ({ page }) => {
await page.goto("http://localhost:3000");
await expect(page).toHaveTitle(/Payload Blank Template/);
const heading = page.locator("h1").first();
await expect(heading).toHaveText("Welcome to your new project.");
});
});