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.
32 lines
1.2 KiB
TypeScript
32 lines
1.2 KiB
TypeScript
import { expect, test } from '@playwright/test';
|
|
|
|
/**
|
|
* Publish a wall message with a unique body, verify it lands in the feed,
|
|
* then delete it to keep the suite idempotent.
|
|
*/
|
|
test('publish + delete wall message', async ({ page }) => {
|
|
const body = `Hola desde Playwright ${Date.now()}`;
|
|
await page.goto('/wall');
|
|
|
|
// Open the composer.
|
|
await page.getByRole('button', { name: /nuevo mensaje/i }).click();
|
|
|
|
// Type into the mention textarea (the inner textarea is what we target).
|
|
const textarea = page.getByPlaceholder(/recuerda sacar al perro/i);
|
|
await textarea.fill(body);
|
|
|
|
// The preview block renders the same body once the debounced fetch lands.
|
|
await expect(page.getByText('Vista previa')).toBeVisible();
|
|
|
|
// Publish.
|
|
await page.getByRole('button', { name: /publicar/i }).click();
|
|
|
|
// The new message appears in the feed.
|
|
const card = page.locator('article, li').filter({ hasText: body }).first();
|
|
await expect(card).toBeVisible();
|
|
|
|
// Tear down: the test user is the author, so the trash icon is offered.
|
|
await card.getByRole('button', { name: /borrar/i }).click();
|
|
// The browser confirm dialog auto-accepts — ConfirmDialog is the default.
|
|
page.on('dialog', (dialog) => void dialog.accept());
|
|
});
|