diff --git a/app/components/settings/health_summary.html.erb b/app/components/settings/health_summary.html.erb deleted file mode 100644 index 646c89521..000000000 --- a/app/components/settings/health_summary.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -
<%= tagline %>
<% end %> -- Connect external accounts so transactions, balances and holdings flow into Sure automatically. -
+<%= t("settings.providers.show.lede") %>
<% if @connected.any? || @needs_attention.any? %> <% sync_all_disabled = Current.family.last_sync_all_attempted_at.present? && Current.family.last_sync_all_attempted_at > 30.seconds.ago %> <%= button_to sync_all_settings_providers_path, @@ -29,28 +27,25 @@ <% end %><%= t("settings.providers.groups.empty_connected") %>
+ <% if all_connections.any? %> + <%= render "settings/providers/group_heading", + title: t("settings.providers.groups.your_connections"), + count: all_connections.size %> <% end %> <% all_connections.each do |entry| %> <% auto_open = [ :warn, :err ].include?(entry[:summary][:status]) || all_connections.size == 1 %> <% sync_action = entry[:partial].present? ? render("settings/providers/sync_button", provider_key: entry[:provider_key], last_synced_at: entry[:summary][:last_synced_at]) : nil %> - <% maturity_label = Settings::ProviderCard::MATURITY_LABELS[entry[:maturity]] %> + <% maturity_label = Settings::ProviderCard.maturity_label(entry[:maturity]) %> <% maturity_badge = maturity_label ? content_tag(:span, maturity_label, class: "text-xs font-medium px-1.5 py-0.5 rounded-full bg-alpha-black-50 text-secondary") : nil %> + <% status_pill = render("settings/providers/status_pill", status: entry[:summary][:status]) %> <%= settings_section title: entry[:title], collapsible: true, open: auto_open, auto_open_param: entry[:auto_open_param], - status: entry[:summary][:status], + status_pill: status_pill, meta: entry[:summary][:meta], actions: sync_action, badge: maturity_badge do %> diff --git a/config/locales/views/settings/en.yml b/config/locales/views/settings/en.yml index c47fd2444..e141c8c7e 100644 --- a/config/locales/views/settings/en.yml +++ b/config/locales/views/settings/en.yml @@ -176,7 +176,7 @@ en: whats_new_label: What's new api_keys_label: API Key appearance_label: Appearance - bank_sync_label: Bank Sync + bank_sync_label: Bank sync settings_nav_link_large: next: Next previous: Back @@ -197,13 +197,7 @@ en: connected: Connected needs_attention: Action needed available: Available - empty_connected: Nothing connected yet — pick a provider below to get started. empty_available: All available providers are connected. - health: - connected: Connected - needs_attention: Action needed - errors: Errors - accounts_synced: Accounts synced meta: sync_error: Sync error no_recent_sync: Sync overdue @@ -235,7 +229,12 @@ en: title: Add another provider body: Connect a new bank or data source to start syncing accounts. cta: Browse providers + maturity: + beta: Beta + alpha: Alpha show: + page_title: Bank sync + lede: Connect external accounts so transactions, balances and holdings flow into Sure automatically. coinbase_title: Coinbase encryption_error: title: Encryption Configuration Required diff --git a/test/system/settings/providers_test.rb b/test/system/settings/providers_test.rb index 2de951c31..fd5870e6b 100644 --- a/test/system/settings/providers_test.rb +++ b/test/system/settings/providers_test.rb @@ -81,17 +81,6 @@ class Settings::ProvidersTest < ApplicationSystemTestCase assert_operator available_y, :<, available_grid_top, "Available heading should appear above the card grid" end - test "health strip shows four tiles with correct counts" do - SimplefinItem.create!(family: @family, name: "Test SimpleFIN", access_url: "https://bridge.simplefin.org/simplefin/access") - - visit settings_providers_path - - assert_text "Connected" - assert_text "Action needed" - assert_text "Errors" - assert_text "Accounts synced" - end - test "action needed group is absent when no providers have issues" do SimplefinItem.create!(family: @family, name: "Test SimpleFIN", access_url: "https://bridge.simplefin.org/simplefin/access") @@ -149,14 +138,11 @@ class Settings::ProvidersTest < ApplicationSystemTestCase end end - test "clicking a provider card connect link opens the connect drawer" do + test "clicking a provider card opens the connect drawer" do visit settings_providers_path within available_provider_cards_container do - card = find(:xpath, ".//div[contains(concat(' ', normalize-space(@class), ' '), ' bg-container ')][.//span[normalize-space()='SimpleFIN']]") - within(card) do - find("a[data-turbo-frame='drawer']", text: "Connect").click - end + find("a[data-turbo-frame='drawer']", text: "SimpleFIN").click end assert_selector "dialog[open]" diff --git a/test/system/settings_test.rb b/test/system/settings_test.rb index 941d1bd02..fa04fb42d 100644 --- a/test/system/settings_test.rb +++ b/test/system/settings_test.rb @@ -7,7 +7,7 @@ class SettingsTest < ApplicationSystemTestCase # Base settings available to all users @settings_links = [ [ "Accounts", accounts_path ], - [ "Bank Sync", settings_providers_path ], + [ "Bank sync", settings_providers_path ], [ "Preferences", settings_preferences_path ], [ "Profile Info", settings_profile_path ], [ "Security", settings_security_path ],