mirror of
https://github.com/Komediruzecki/token-circles.git
synced 2026-10-20 09:46:43 +02:00
Added 18 E2E test specifications following EARS format for all backend modules: New Specs Created: - tags.spec.md (56 tests) - Tag CRUD, hierarchy, filtering, grouping - receipts.spec.md (57 tests) - Receipts, OCR, splitting, sharing, export - recurring.spec.md (57 tests) - Recurrence patterns, scheduling, timezone - reports.spec.md (62 tests) - Custom reports, export, scheduling, comparison - calculator.spec.md (54 tests) - Financial calculators, conversions, schedules Existing Specs Reviewed: - All existing backend specs validated and organized - Each spec includes Must/Should priorities, test types, steps, validations - Consistent formatting across all 18 specifications Each spec covers: - CRUD operations - Data validation - Performance testing - Error handling - Integration tests - Cross-user data isolation - Acceptance criteria Format: EARS-compliant with test IDs, priorities, types (Positive/Negative/Integration/Performance), detailed steps, validations, and expected results.
7.0 KiB
7.0 KiB
Savings Goals Specification (Frontend)
Module: Savings Goals (UI) Version: 2.0 Status: Active Priority: Must
1. Overview
The Savings Goals module provides a complete interface for setting financial goals and tracking progress toward them.
2. Functional Requirements
2.1. Goal List
| ID | Description | Type |
|---|---|---|
| SG-001 | Goal list must display all savings goals | Must |
| SG-002 | List must show name, target amount, current amount | Must |
| SG-003 | List must show progress percentage | Must |
| SG-004 | List must show remaining amount | Must |
| SG-005 | List must support filtering | Should |
| SG-006 | Loading state must display while fetching | Must |
| SG-007 | Empty state must display when no goals exist | Must |
2.2. Goal Display
| ID | Description | Type |
|---|---|---|
| SG-010 | Each goal must show name, target amount, current amount | Must |
| SG-011 | Goal must show progress bar | Must |
| SG-012 | Goal must show remaining amount | Must |
| SG-013 | Goal must show percentage | Must |
| SG-014 | Goal must show target date | Should |
| SG-015 | Goal must show category | Should |
| SG-016 | Goal must show icon | Should |
| SG-017 | Completed goals must be highlighted | Should |
2.3. Create Goal
| ID | Description | Type |
|---|---|---|
| SG-020 | Add goal button must be visible | Must |
| SG-021 | Create goal form must accept all fields | Must |
| SG-022 | Form must include name, target amount | Must |
| SG-023 | Form must support current amount | Should |
| SG-024 | Form must support target date | Should |
| SG-025 | Form must support category | Should |
| SG-026 | Form must support icon | Should |
| SG-027 | Form must support notes | Should |
| SG-028 | Form validation must prevent errors | Must |
| SG-029 | Goal must be created successfully | Must |
| SG-030 | Success message must display after creation | Must |
2.4. Edit Goal
| ID | Description | Type |
|---|---|---|
| SG-040 | Goal must be editable | Must |
| SG-041 | Edit button must be visible on each goal | Must |
| SG-042 | Edit form must pre-fill existing values | Must |
| SG-043 | Changes must update the goal | Must |
| SG-044 | Success message must display after update | Must |
2.5. Contribute to Goal
| ID | Description | Type |
|---|---|---|
| SG-050 | Contribute button must be visible | Must |
| SG-051 | Contribution must update goal amount | Must |
| SG-052 | Contribution must update progress | Must |
| SG-053 | Contribution must show confirmation | Must |
| SG-054 | Contribution must be recorded | Must |
2.6. Delete Goal
| ID | Description | Type |
|---|---|---|
| SG-060 | Delete button must be visible on each goal | Must |
| SG-061 | Delete must require confirmation | Must |
| SG-062 | Goal must be deleted on confirmation | Must |
| SG-063 | Success message must display after deletion | Must |
2.7. Goal Completion
| ID | Description | Type |
|---|---|---|
| SG-070 | Completed goals must be marked | Must |
| SG-071 | Completion must show celebration | Should |
| SG-072 | Completion must show time saved/made | Should |
2.8. Navigation
| ID | Description | Type |
|---|---|---|
| SG-080 | Goal list must be accessible from sidebar | Must |
| SG-081 | Navigation must update URL hash | Must |
| SG-082 | Browser back/forward must work | Should |
3. Non-Functional Requirements
3.1. Performance
| ID | Description | Target |
|---|---|---|
| NFR-001 | List load must complete within 100ms | 100ms |
| NFR-002 | Goal creation must complete within 50ms | 50ms |
3.2. Usability
| ID | Description | Requirement |
|---|---|---|
| NFR-003 | Form must be mobile-responsive | Always |
| NFR-004 | Progress bars must be readable | Always |
| NFR-005 | Contribution input must be prominent | Should |
3.3. Accessibility
| ID | Description | Requirement |
|---|---|---|
| NFR-006 | Progress bars must have accessible labels | Should |
| NFR-007 | Keyboard navigation must be supported | Always |
4. UI Components
4.1. Goal Cards
- Name, target amount, current amount
- Progress bar
- Remaining amount
- Percentage
- Target date (if set)
- Category and icon
- Edit, Contribute, Delete buttons
4.2. Goal Form Modal
- Name input
- Target amount input
- Current amount input (optional)
- Target date picker (optional)
- Category dropdown (optional)
- Icon picker (optional)
- Notes textarea (optional)
- Submit and Cancel buttons
4.3. Contribution Input
- Amount input
- Account selection (optional)
- Date picker
- Contribute button
4.4. Progress Bars
- Color-coded by progress
- Green: close to target
- Yellow: in progress
- Red: far from target
5. User Flows
5.1. View Goals
- User clicks "Savings Goals" in sidebar
- System loads goal list
- System displays goal cards
- System shows total progress
5.2. Create Goal
- User clicks "Add Goal" button
- System opens creation modal
- User fills in form
- User clicks "Save"
- System validates and saves
- System closes modal and shows success
- Goal appears in list
5.3. Contribute to Goal
- User opens goal details
- User clicks "Contribute" button
- User enters contribution amount
- User confirms contribution
- System updates goal amount
- System updates progress
- System shows success message
5.4. View Goal Progress
- User views goal card
- System shows progress bar
- System shows current vs target amounts
- System shows remaining amount
- System shows percentage
5.5. Edit Goal
- User clicks "Edit" on goal
- System opens edit modal with existing values
- User modifies fields
- User clicks "Save"
- System validates and updates
- System shows success message
5.6. Delete Goal
- User clicks "Delete" on goal
- User confirms deletion
- System deletes goal
- System shows success message
6. Exceptional Conditions
| Condition | Behavior |
|---|---|
| API returns error | System shows error message |
| Form validation fails | System highlights errors |
| API is unavailable | System shows offline message |
| No goals exist | System shows empty state with create button |
| Target amount cannot be less than current | System shows error message |
7. Open/Closed Questions
- Should goals support milestones?
- Should goals support automatic contributions?
- Should goals show investment projections?
- Should goals be shared?
8. Acceptance Criteria
- User can view all goals
- User can create goals
- User can edit goals
- User can delete goals
- User can contribute to goals
- Progress updates correctly
- Goals load quickly
- Mobile responsive
- Contribution input works correctly
9. Integration Points
| Module | Purpose |
|---|---|
| Backend /api/savings-goals | Data source |
| Backend /api/transactions | Contribution tracking |
10. Goal Types
- Emergency Fund
- Vacation
- New Car
- Home Down Payment
- Retirement
- Education
- Other