whisper-money/tests/Browser
Víctor Falcón b1f01e4a8f
feat(automation-rules): simplify smart rules UI, fix re-evaluation, and localize amounts (#161)
## Why

**Problem:** Bulk re-evaluation of transactions against smart rules was
broken because the code required an encryption key that no longer exists
in the app. Additionally, the rule builder UI had unnecessary complexity
(priority field, labels/tags, date/category/notes conditions) that added
cognitive load without value. Currency amounts were also always
formatted with US conventions regardless of the user's locale.

## What

**Automation rules – re-evaluation fix:**
- Remove encryption key requirement from `evaluateRules`,
`evaluateRulesForTransactions`, `evaluateRulesForNewTransaction`, and
`prepareTransactionData` (accept `CryptoKey | null`)
- Drop `isKeySet` guards from single-transaction and bulk re-evaluate
handlers in `transaction-list.tsx` and `transaction-actions-menu.tsx`
- Simplify `use-re-evaluate-all-transactions.tsx` to pass `null` as key
directly

**Automation rules – UI cleanup:**
- Hide priority field from create/edit dialogs (still sends `priority:
0` / `rule.priority` to satisfy backend validation)
- Remove labels/tags from create/edit dialogs, actions column, and table
display
- Remove `date`, `category`, and `notes` from rule condition field
options in `rule-builder-utils.ts`
- Add `opacity-30` to disabled X button when only one condition/group
remains

**Amount localization:**
- Replace hardcoded `'en-US'` with `useLocale()` in `AmountDisplay` so
symbol position and number format follow the user's locale (e.g.
`89.705,00 €` in Spanish)

## Verification

- 38/38 `AutomationRuleTest` + `AutomationRuleEvaluationTest` tests pass
- Re-evaluation works without an encryption key set
- Spanish locale users see `89.705,00 €` instead of `€89,705.00`
2026-02-28 13:24:57 +00:00
..
assets Improve automation rules and sync error handling 2025-12-01 10:30:22 +01:00
.gitignore Add category type field support (#2) 2025-12-01 20:19:47 +01:00
AccountsPageTest.php perf(accounts): replace client-side API calls with Inertia deferred prop (#144) 2026-02-23 20:08:41 +01:00
AmountInputTest.php Remove encryption from browser tests and demo user (#129) 2026-02-17 11:45:27 +01:00
AuthenticationTest.php feat: Enable email verification on sign up (#97) 2026-02-03 10:15:07 +01:00
AutomationRuleBuilderTest.php feat(automation-rules): simplify smart rules UI, fix re-evaluation, and localize amounts (#161) 2026-02-28 13:24:57 +00:00
BankAccountsTest.php Remove encryption from browser tests and demo user (#129) 2026-02-17 11:45:27 +01:00
BudgetCrudTest.php Remove budgets feature flag (#108) 2026-02-12 09:58:01 +01:00
BudgetsFeatureNavigationTest.php Remove budgets feature flag (#108) 2026-02-12 09:58:01 +01:00
CategoriesTest.php User Onboarding Flow (#23) 2025-12-12 13:06:08 +01:00
ImportTransactionsTest.php Remove encryption from browser tests and demo user (#129) 2026-02-17 11:45:27 +01:00
OnboardingFlowTest.php Remove encryption from browser tests and demo user (#129) 2026-02-17 11:45:27 +01:00
TransactionsTest.php Remove encryption from browser tests and demo user (#129) 2026-02-17 11:45:27 +01:00