31 lines
1.6 KiB
Markdown
31 lines
1.6 KiB
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: User can record categorized expenses
|
|
The system SHALL allow the user to create an expense with a title, amount, category, and local calendar date using fixed starter categories.
|
|
|
|
#### Scenario: Valid expense is created
|
|
- **WHEN** the user submits a title, positive amount, valid category, and valid local date
|
|
- **THEN** the system stores the expense and returns the created record
|
|
|
|
#### Scenario: Invalid expense is rejected
|
|
- **WHEN** the user submits a missing title, invalid amount, invalid category, or invalid date
|
|
- **THEN** the system rejects the request with a validation error and does not store the expense
|
|
|
|
### Requirement: User can review and delete expenses
|
|
The system SHALL allow the user to list recorded expenses and delete a specific expense by identifier.
|
|
|
|
#### Scenario: Expenses are listed
|
|
- **WHEN** the user requests expenses for the app
|
|
- **THEN** the system returns stored expenses in a stable order with their recorded fields
|
|
|
|
### Requirement: User can browse expense history by month
|
|
The system SHALL allow the user to select a `YYYY-MM` month when reviewing expense history and SHALL return the expenses recorded for that month.
|
|
|
|
#### Scenario: Prior month entries are visible
|
|
- **WHEN** the user selects February 2026 in the add-expense history view
|
|
- **THEN** the system shows the expenses recorded in February 2026 and exposes delete actions for deletable entries in that month
|
|
|
|
#### Scenario: Expense is deleted
|
|
- **WHEN** the user deletes an existing expense
|
|
- **THEN** the system removes that expense and it no longer appears in future listings or aggregates
|