familynido/web/familynido-web/e2e/calendar.spec.ts
Pablo Fernández a308041d59 Initial commit
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.
2026-05-13 00:23:14 +02:00

19 lines
1,002 B
TypeScript

import { expect, test } from '@playwright/test';
/**
* Structural smoke for `/calendar`: the page renders, the month grid mounts,
* and the link to "Cuentas vinculadas" exists. We don't try to assert
* specific events — Google Calendar isn't synced in CI, so the empty state
* is the only deterministic outcome there. Locally, if the dev has linked
* an account, the test still passes (we don't assert the empty banner is
* visible, only that one of the two valid render paths produced an h1).
*/
test('calendar renders the month grid and the accounts link', async ({ page }) => {
await page.goto('/calendar');
await expect(page.getByRole('heading', { level: 1 })).toContainText(/calendario/i);
// The settings cog button routes to /calendar/accounts.
await expect(page.getByRole('link', { name: /cuentas vinculadas/i })).toBeVisible();
// Refresh button exists (idempotent click — should not throw).
await page.getByRole('button', { name: /refrescar eventos/i }).click();
});