2.6 KiB
2.6 KiB
Task D.7.10 Setup Integration Test & Golden Dataset
Date: 2026-07-03 Status: implemented
Scope Delivered
Added official setup golden dataset:
setup/golden-dataset/README.mdsetup/golden-dataset/dataset.json- 22 setup CSV files matching
setup/templates/templates.json
Dataset coverage:
- Organizations:
ALLA,ONVALLA - Users: IT/admin, marketing, sales, sales manager, CEO
- Customers: 10
- Contacts: 20
- Leads: 20
- Opportunities: 15
- Quotations: 20
- Multiple branches and product types
- Quotation statuses: draft, pending approval, approved, rejected, revision
Added setup integration documentation:
docs/setup/integration-scenarios.mddocs/setup/setup-performance-report.md
Added automated setup contract tests:
src/tests/setup/helpers.tssrc/tests/setup/golden-dataset.test.tssrc/tests/setup/setup-install.test.tssrc/tests/setup/setup-preview.test.tssrc/tests/setup/setup-commit.test.tssrc/tests/setup/setup-verification.test.tssrc/tests/setup/setup-resume.test.tssrc/tests/setup/setup-reset.test.ts
Added script:
npm run test:setup
Test Coverage
The setup test suite validates:
- Golden dataset files exist.
- Golden dataset headers match official setup templates.
- Required row counts are present.
- Quotation statuses cover approval and revision scenarios.
- Golden dataset includes every supported setup template.
- Dataset import order follows template registry ordering.
- Preview hash semantics change when CSV content changes.
- Commit API and seed manifest integration exist.
- Commit engine preserves preview hash validation contract.
- Setup readiness and verification APIs exist.
- Setup run resume APIs exist.
- Setup wizard persists core step outputs.
- Reset and reseed APIs exist.
- Reset guard source blocks production and requires preview token semantics.
- Unsafe reset scopes are intentionally blocked.
- Integration scenarios document operational readiness checks.
Validation
npm run test:setuppassed: 17 tests.npm run typecheck -- --pretty falsepassed.npx oxlint src/tests/setuppassed.
Residual Notes
- This task adds runnable setup contract tests using Node's built-in test runner to avoid introducing a new test framework.
- Full empty-database E2E execution is documented in
docs/setup/integration-scenarios.mdbut not automated because this repository does not yet have an isolated CI test database harness. - Performance targets are documented in
docs/setup/setup-performance-report.md; measured preview/commit/verification timings require the future isolated database harness.