test(ci): add quality gates, e2e data prep, and i18n integration coverage
This commit is contained in:
@ -23,6 +23,7 @@ export default defineConfig({
|
||||
{ text: "CRUD Baseline", link: "/product-engineering/crud-baseline" },
|
||||
{ text: "i18n Baseline", link: "/product-engineering/i18n-baseline" },
|
||||
{ text: "RBAC And Permissions", link: "/product-engineering/rbac-permission-model" },
|
||||
{ text: "Testing Strategy", link: "/product-engineering/testing-strategy" },
|
||||
{ text: "Workflow", link: "/workflow" },
|
||||
],
|
||||
},
|
||||
|
||||
@ -8,6 +8,7 @@ This section covers platform and implementation documentation for engineers and
|
||||
- [Architecture](/architecture)
|
||||
- [Better Auth Baseline](/product-engineering/auth-baseline)
|
||||
- [RBAC And Permissions](/product-engineering/rbac-permission-model)
|
||||
- [Testing Strategy Baseline](/product-engineering/testing-strategy)
|
||||
- [Workflow](/workflow)
|
||||
|
||||
## Scope
|
||||
|
||||
33
docs/product-engineering/testing-strategy.md
Normal file
33
docs/product-engineering/testing-strategy.md
Normal file
@ -0,0 +1,33 @@
|
||||
# Testing Strategy Baseline
|
||||
|
||||
## Goals
|
||||
|
||||
- Keep lint, typecheck, unit/integration, and e2e as mandatory quality gates.
|
||||
- Make e2e runs deterministic by preparing schema and seeded data before test execution.
|
||||
- Keep test data isolated per environment (`dev` local, CI database service in workflow).
|
||||
|
||||
## Current Gate Stack
|
||||
|
||||
- `bun run check`
|
||||
- `bun run typecheck`
|
||||
- `bun run test`
|
||||
- `bun run test:e2e`
|
||||
|
||||
## Data Preparation
|
||||
|
||||
- `bun run test:e2e:prepare` runs:
|
||||
- Prisma client generation
|
||||
- migration deploy
|
||||
- seed data (including support user bootstrap)
|
||||
- `bun run test:e2e` and related scripts call `test:e2e:prepare` automatically.
|
||||
|
||||
## Locale Integration Coverage
|
||||
|
||||
- `e2e/i18n.pw.ts` covers:
|
||||
- web locale switch + persistence
|
||||
- admin locale switch + persistence
|
||||
|
||||
## CI
|
||||
|
||||
- Real quality workflow: `.gitea/workflows/ci.yml`
|
||||
- Uses a PostgreSQL service container and runs the full gate stack, including e2e.
|
||||
@ -15,10 +15,10 @@ Follow `BRANCHING.md`:
|
||||
|
||||
## Quality Gates
|
||||
|
||||
- `bun run lint`
|
||||
- `bun run check`
|
||||
- `bun run typecheck`
|
||||
- `bun run test`
|
||||
- `bun run test:e2e --list`
|
||||
- `bun run test:e2e`
|
||||
|
||||
## Changelog
|
||||
|
||||
|
||||
Reference in New Issue
Block a user