Add exchange rate feature with multi-currency transactions and transfers support (#1099)

Co-authored-by: Pedro J. Aramburu <pedro@joakin.dev>
This commit is contained in:
Pedro J. Aramburu
2026-04-08 16:05:58 -03:00
committed by GitHub
parent 8e81e967fc
commit f699660479
48 changed files with 1886 additions and 73 deletions

View File

@@ -65,4 +65,18 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
yield
end
end
# Interact with DS::Select custom dropdown components.
# DS::Select renders as a button + listbox — not a native <select> — so
# Capybara's built-in `select(value, from:)` does not work with it.
def select_ds(label_text, record)
field_label = find("label", exact_text: label_text)
container = field_label.ancestor("div.relative")
container.find("button").click
if container.has_selector?("input[type='search']", visible: true)
container.find("input[type='search']", visible: true).set(record.name)
end
listbox = container.find("[role='listbox']", visible: true)
listbox.find("[role='option'][data-value='#{record.id}']", visible: true).click
end
end