fiddy/docs/SEED_DATA.md
2026-02-11 23:45:15 -08:00

54 lines
1.3 KiB
Markdown

# UI Seed Data (Playwright)
This repo uses a deterministic UI seed dataset for Playwright. The seed targets the external **dev** database only and is guarded by `ALLOWED_DB_NAMES`.
## Requirements
- `DATABASE_URL` must point at the dev clone database.
- `ALLOWED_DB_NAMES` is **required** and must include the dev database name (case-insensitive, comma-separated list).
- Seed runs automatically before Playwright only.
## Seed Script
- Script location: packages/db/test-ui-seed
- SQL file: docs/seed-ui.sql
- Playwright auto-seed: pretest hook runs the script before `npm run test:ui`.
## Seed Credentials
All seeded users share the same password:
- Password: `FiddyDev123!`
Seeded users:
- owner1@fiddy.dev
- admin1@fiddy.dev
- member1@fiddy.dev
- requester1@fiddy.dev
- nogroup@fiddy.dev
- member2@fiddy.dev
Seeded groups:
- Alpha Household
- Beta Office
- Gamma Club
## Coverage Notes
- Join policies: NOT_ACCEPTING, AUTO_ACCEPT, APPROVAL_REQUIRED.
- Join requests: one pending request on Beta Office.
- Invite links: active, expired, revoked, and single-use examples.
- Spendings: tagged, untagged, and no-receipt examples.
- Receipts: ASCII text payloads stored as `bytea`.
## Audit Summary Output
The seed runner prints:
- Counts per seeded table.
- User emails and group names.
Use the output for manual audit verification.