The SaaS Boilerplate ($59) includes Playwright E2E tests covering: landing page rendering, sign-in page navigation, pricing page display, unauthenticated redirect to sign-in, and theme toggle functionality. The Playwright config is pre-configured with the Next.js dev server as the web server. Tests live in the tests/ directory and run via npm run test.
import { test, expect } from "@playwright/test";
test("landing page loads", async ({ page }) => {
await page.goto("/");
await expect(page.locator("h1")).toContainText("Launch your SaaS");
});
test("redirects unauthenticated users", async ({ page }) => {
await page.goto("/dashboard");
await expect(page).toHaveURL(//auth/signin/);
});