mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-04 04:55:20 +02:00
Start and end balance breakdown in activity view (#2466)
* Initial data objects * Remove trend calculator * Fill in balance reconciliation for entry group * Initial tooltip component * Balance trends in activity view * Lint fixes * trade partial alignment fix * Tweaks to balance calculation to acknowledge holdings value better * More lint fixes * Bump brakeman dep * Test fixes * Remove unused class
This commit is contained in:
parent
ab6fdbbb68
commit
e8eb32d2ae
27 changed files with 1088 additions and 119 deletions
|
@ -118,22 +118,25 @@ class TransactionsTest < ApplicationSystemTestCase
|
|||
|
||||
assert_text "No entries found"
|
||||
|
||||
# Wait for Turbo to finish updating the DOM
|
||||
sleep 0.5
|
||||
|
||||
# Page reload doesn't affect results
|
||||
visit current_url
|
||||
|
||||
assert_text "No entries found"
|
||||
|
||||
within "ul#transaction-search-filters" do
|
||||
find("li", text: account.name).first("button").click
|
||||
find("li", text: "on or after #{10.days.ago.to_date}").first("button").click
|
||||
find("li", text: "on or before #{1.day.ago.to_date}").first("button").click
|
||||
find("li", text: "Income").first("button").click
|
||||
find("li", text: "less than 200").first("button").click
|
||||
find("li", text: category.name).first("button").click
|
||||
find("li", text: merchant.name).first("button").click
|
||||
# Remove all filters by clicking their X buttons
|
||||
# Get all the filter buttons at once to avoid stale elements
|
||||
filter_count = page.all("ul#transaction-search-filters li button").count
|
||||
|
||||
# Click each one with a small delay to let Turbo update
|
||||
filter_count.times do
|
||||
page.all("ul#transaction-search-filters li button").first.click
|
||||
sleep 0.1
|
||||
end
|
||||
|
||||
assert_selector "#" + dom_id(@transaction), count: 1
|
||||
assert_text @transaction.name
|
||||
end
|
||||
|
||||
test "can select and deselect entire page of transactions" do
|
||||
|
@ -191,7 +194,7 @@ class TransactionsTest < ApplicationSystemTestCase
|
|||
fill_in "Date", with: transfer_date
|
||||
fill_in "model[amount]", with: 175.25
|
||||
click_button "Add transaction"
|
||||
within "#entry-group-" + transfer_date.to_s do
|
||||
within "#" + dom_id(investment_account, "entries_#{transfer_date}") do
|
||||
assert_text "175.25"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue