FamilyNido — a self-hosted PWA for a single household: shared calendar, chores, meals, school agenda, health records and a family wall. One instance per family, deployable with `docker compose` on any home server. Stack: .NET 10 (ASP.NET Core Minimal APIs) + EF Core 10 + PostgreSQL 16 on the backend, Angular 21 (standalone, signals, zoneless) + Tailwind CSS v4 on the frontend, SignalR for realtime, optional OIDC alongside local credentials, integration via a versioned `/api/v1/**` public API. See README.md for the module overview and how to deploy.
25 lines
1.1 KiB
TypeScript
25 lines
1.1 KiB
TypeScript
import { expect, test } from '@playwright/test';
|
|
|
|
/**
|
|
* Smoke test: with a valid session, the app shell renders, the user lands
|
|
* on /home, and every primary tab is reachable. Catches regressions in
|
|
* routing, the auth guard and the layout component.
|
|
*/
|
|
test.describe('app shell', () => {
|
|
test('redirects authenticated user to /home and shows the nav', async ({ page }) => {
|
|
await page.goto('/');
|
|
await expect(page).toHaveURL(/\/home$/);
|
|
// Home is the dashboard — the page contains the greeting heading.
|
|
await expect(page.getByRole('heading', { level: 1 })).toBeVisible();
|
|
});
|
|
|
|
test('every primary tab loads without 404', async ({ page }) => {
|
|
const routes = ['/home', '/tasks', '/calendar', '/wall', '/meals', '/nido', '/account'];
|
|
for (const route of routes) {
|
|
await page.goto(route);
|
|
await expect(page).toHaveURL(new RegExp(route.replace('/', '\\/') + '$'));
|
|
// Each route renders an h1 — that's a deliberate convention across the app.
|
|
await expect(page.getByRole('heading', { level: 1 })).toBeVisible();
|
|
}
|
|
});
|
|
});
|