Testing Strategy - RodrigoMattosoSilveira/EnterpriseRemoteSystems GitHub Wiki

20.1 Backend tests

  • unit tests for calculators and services
  • repository tests against SQLite test DB
  • Fiber handler tests with httptest
  • golden JSON responses for critical endpoints if useful

Highest-priority business-rule tests

  1. 90-day journey default end calculation
  2. extension recalculates projected end
  3. 30-day return eligibility validation
  4. daily wage accrual
  5. salary daily normalization accrual
  6. commission accrual from well production
  7. accrual remains pending when production missing
  8. sick substitution postings
  9. license substitution postings
  10. expense posting in BRL
  11. expense posting in gold
  12. reversal creation
  13. zero gold operation
  14. close journey ledger posting
  15. projected earnings calculations

20.2 Frontend tests

  • component tests for summary cards and forms
  • integration tests for key workflows
  • responsive layout checks

20.3 End-to-end tests

Recommended Playwright scenarios:

  1. create person → create collaborator
  2. plan period → accrue earnings
  3. record gold price → price list preview → expense entry
  4. view current account summary/detail
  5. revert expense
  6. zero gold
  7. close journey