All Stories
2-4-9-cashier-page-validationDoneEpic 2.4
Story 2.4.9: Cashier Page Validation
Status: done
Tasks
- Task 1: Validate User Balance View API (AC: #1)
- 1.1: Test GET `/api/v1/agent/clients` endpoint with authentication
- 1.2: Verify response includes all required balance fields
- 1.3: Test available_balance calculation accuracy
- 1.4: Validate credit_limit + account_balance logic
- 1.5: Test pagination parameters (limit, offset)
- 1.6: Verify agent authorization (only sees own clients)
- Task 2: Validate Credit Transaction API (AC: #2)
- 2.1: Test POST `/api/v1/agent/transactions/create` with `deposit` type
- 2.2: Test POST with `credit_adj` type
- 2.3: Verify request validation (missing fields, invalid amounts)
- 2.4: Test authorization check (user belongs to agent)
- 2.5: Verify balance update is atomic and accurate
- 2.6: Confirm dual transaction records (financial_transactions + agent_transactions)
- 2.7: Validate response structure and updated balance
- Task 3: Validate Debit Transaction API (AC: #3)
- 3.1: Test POST `/api/v1/agent/transactions/create` with `withdrawal` type
- 3.2: Test POST with `debit_adj` type
- 3.3: Verify negative balance prevention (respects credit limit)
- 3.4: Test balance update calculation
- 3.5: Validate audit trail fields (balance_before, balance_after)
- 3.6: Test status tracking (completed, pending, failed)
- Task 4: Validate Transaction History API (AC: #4)
- 4.1: Test GET `/api/v1/agent/transactions/history` without filters
- 4.2: Test all filter parameters (agent_id, player_id, types, dates)
- 4.3: Verify enriched data includes usernames and agent names
- 4.4: Validate ordering (created_at DESC)
- 4.5: Test pagination response structure
- 4.6: Verify both user and agent transaction records appear
- Task 5: Validate Settlement Integration (AC: #5)
- 5.1: Test GET `/api/v1/agent/settlement/current-period`
- 5.2: Test GET `/api/v1/agent/settlement/dashboard-stats`
- 5.3: Test POST `/api/v1/agent/settlement/process-settlement`
- 5.4: Verify settlement transaction updates user balance
- 5.5: Validate credit blocking for overdue settlements
- 5.6: Confirm settlement history tracking (on_time, days_late)
- Task 6: Validate Credit System Calculations (AC: #6)
- 6.1: Verify credit_limit displayed separately from balance
- 6.2: Test available_funds calculation formula
- 6.3: Confirm credit adjustments affect balance only
- 6.4: Test wager validation against available funds
- 6.5: Verify negative balance allowed within credit limit
- 6.6: Validate settlement requirement calculations
- Task 7: Validate Cashier Page UI/UX (AC: #7)
- 7.1: Load `/agent/dashboard/cashier` and verify no console errors
- 7.2: Verify stats cards display correct calculations
- 7.3: Test transaction creation dialog validation
- 7.4: Verify transaction history table displays all columns
- 7.5: Test all filters (search, type, status)
- 7.6: Validate mobile responsive layout (cards vs table)
- 7.7: Test real-time balance updates after transaction
- 7.8: Verify error handling and user feedback
Progress
Tasks0/7
Acceptance Criteria0
Total Tasks7