23 lines
521 B
TypeScript
23 lines
521 B
TypeScript
|
|
import { expect, test } from "@playwright/test";
|
||
|
|
import { config } from "@repo/config";
|
||
|
|
|
||
|
|
test.describe("home page", () => {
|
||
|
|
if (config.ui.marketing.enabled) {
|
||
|
|
test("should load", async ({ page }) => {
|
||
|
|
await page.goto("/");
|
||
|
|
|
||
|
|
await expect(
|
||
|
|
page.getByRole("heading", {
|
||
|
|
name: "Your revolutionary Next.js SaaS",
|
||
|
|
}),
|
||
|
|
).toBeVisible();
|
||
|
|
});
|
||
|
|
} else {
|
||
|
|
test("should be redirected to app", async ({ page }) => {
|
||
|
|
await page.goto("/");
|
||
|
|
|
||
|
|
await expect(page).toHaveURL(/\.*\/auth\/login/);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
});
|