1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 15:49:39 +02:00

Multi-step account forms + clearer balance editing (#2427)
Some checks failed
Publish Docker image / ci (push) Has been cancelled
Publish Docker image / Build docker image (push) Has been cancelled

* Initial multi-step property form

* Improve form structure, add optional tooltip help icons to form fields

* Add basic inline alert component

* Clean up and improve property form lifecycle

* Implement Account status concept

* Lint fixes

* Remove whitespace

* Balance editing, scope updates for account

* Passing tests

* Fix brakeman warning

* Remove stale columns

* data constraint tweaks

* Redundant property
This commit is contained in:
Zach Gollwitzer 2025-07-03 09:33:07 -04:00 committed by GitHub
parent ba7e8d3893
commit 662f2c04ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 1036 additions and 427 deletions

View file

@ -67,21 +67,21 @@ class EntryTest < ActiveSupport::TestCase
assert_equal 0, family.entries.search(params).size
end
test "active scope only returns entries from active accounts" do
test "visible scope only returns entries from visible accounts" do
# Create transactions for all account types
active_transaction = create_transaction(account: accounts(:depository), name: "Active transaction")
inactive_transaction = create_transaction(account: accounts(:credit_card), name: "Inactive transaction")
visible_transaction = create_transaction(account: accounts(:depository), name: "Visible transaction")
invisible_transaction = create_transaction(account: accounts(:credit_card), name: "Invisible transaction")
# Update account statuses
accounts(:credit_card).update!(is_active: false)
accounts(:credit_card).disable!
# Test the scope
active_entries = Entry.active
visible_entries = Entry.visible
# Should include entry from active account
assert_includes active_entries, active_transaction
assert_includes visible_entries, visible_transaction
# Should not include entry from inactive account
assert_not_includes active_entries, inactive_transaction
# Should not include entry from disabled account
assert_not_includes visible_entries, invisible_transaction
end
end