whisper-money/tests/Feature/Settings
Víctor Falcón 7a056213cf
feat(accounts): allow setting initial balance when creating balance-tracking accounts (#239)
## Summary

- Adds an optional balance input field to the account creation modal for
**investment**, **loan**, **retirement**, and **savings** account types.
- When a balance is provided, an `AccountBalance` record is created for
today's date upon account creation.
- The balance label adapts to the account type (e.g., "Owed Amount" for
loans, "Balance" for others).

## Changes

- **`account-form.tsx`** — Shows `AmountInput` when a balance-tracking
type is selected and currency is set.
- **`create-account-dialog.tsx`** — Passes `balance` in the POST payload
when present.
- **`StoreAccountRequest.php`** — Adds optional `balance` (nullable
integer) validation.
- **`AccountController::store`** — Creates an `AccountBalance` record
when balance is provided.
- **`AccountTest.php`** — 3 new tests covering creation with balance,
without balance, and invalid balance validation.

## Screenshots
<img width="1017" height="649" alt="image"
src="https://github.com/user-attachments/assets/4bf1530e-0faf-45a4-a3d1-d0ec49d5b412"
/>
2026-03-20 10:51:42 +00:00
..
AccountPageTest.php Reorganize setting items 2025-11-07 18:23:08 +00:00
AccountTest.php feat(accounts): allow setting initial balance when creating balance-tracking accounts (#239) 2026-03-20 10:51:42 +00:00
BankTest.php Accounts: Allow users to create custom banks with his own logo, and name (#12) 2025-12-04 15:24:04 +01:00
BudgetSettingsRedirectTest.php fix(settings): restore budgets settings redirect (#228) 2026-03-16 13:04:08 +01:00
CategoryTest.php feat(cashflow): track transfer categories in trends (#236) 2026-03-18 14:02:47 +00:00
ChartColorSchemeTest.php Add chart color scheme setting (#101) 2026-02-28 12:58:21 +01:00
DeleteAccountPageTest.php Reorganize setting items 2025-11-07 18:23:08 +00:00
NetWorthChartLoanPreferenceTest.php fix(dashboard): treat loans as debt in net worth (#238) 2026-03-20 09:55:53 +00:00
PasswordUpdateTest.php E2E Encryption 2025-11-07 14:21:25 +00:00
ProfileUpdateTest.php Add currency selection to user profile settings (#41) 2025-12-30 07:22:19 +01:00
TwoFactorAuthenticationTest.php E2E Encryption 2025-11-07 14:21:25 +00:00