Commit graph

2 commits

Author SHA1 Message Date
Tiago Yamamoto
45d34f36c8 feat(pagination): add pagination to all list endpoints
Added pagination support to:
- ListCompanies: filter by role, search
- ListProducts: filter by seller, search
- ListOrders: filter by buyer, seller, status
- ListInventory: filter by expiring date, seller

New domain types:
- ProductFilter, ProductPage
- CompanyFilter, CompanyPage
- OrderFilter, OrderPage
- InventoryPage

All endpoints now return paginated responses with:
- items array
- total count
- current page
- page size

Updated MockRepository in both test files to match new signatures
2025-12-20 08:37:59 -03:00
Tiago Yamamoto
b8973739ab feat(backend): add comprehensive test suite for 80% coverage
- Add config_test.go (5 tests for env parsing)
- Add middleware_test.go (16 tests for CORS, Auth, Gzip, Logger)
- Add usecase_test.go (30+ tests for business logic)
- Add payments_test.go (6 tests for MercadoPago gateway)

Coverage: config 100%, middleware 95.9%, payments 100%, usecase 64.7%

feat(marketplace): add test framework and new pages

- Setup Vitest with jsdom environment
- Add cartStore.test.ts (15 tests for Zustand store)
- Add usePersistentFilters.test.ts (5 tests for hook)
- Add apiClient.test.ts (7 tests for axios client)
- Add Orders page with status transitions
- Add Inventory page with stock adjustments
- Add Company page with edit functionality
- Add SellerDashboard page with KPIs

Total marketplace tests: 27 passing
2025-12-20 07:43:56 -03:00