2024-04-18 07:56:51 -04:00
|
|
|
require "application_system_test_case"
|
|
|
|
|
|
|
|
class SettingsTest < ApplicationSystemTestCase
|
|
|
|
setup do
|
|
|
|
sign_in @user = users(:family_admin)
|
|
|
|
|
|
|
|
@settings_links = [
|
|
|
|
[ "Account", "Account", settings_profile_path ],
|
|
|
|
[ "Preferences", "Preferences", settings_preferences_path ],
|
|
|
|
[ "Notifications", "Notifications", settings_notifications_path ],
|
|
|
|
[ "Security", "Security", settings_security_path ],
|
|
|
|
[ "Billing", "Billing", settings_billing_path ],
|
|
|
|
[ "Accounts", "Accounts", accounts_path ],
|
2024-05-23 08:09:33 -04:00
|
|
|
[ "Tags", "Tags", tags_path ],
|
2024-06-20 08:15:09 -04:00
|
|
|
[ "Categories", "Categories", categories_path ],
|
2024-06-20 08:38:59 -04:00
|
|
|
[ "Merchants", "Merchants", merchants_path ],
|
2024-07-01 10:49:43 -04:00
|
|
|
[ "Rules", "Rules", rules_transactions_path ],
|
2024-05-17 09:09:32 -04:00
|
|
|
[ "Imports", "Imports", imports_path ],
|
2024-04-18 07:56:51 -04:00
|
|
|
[ "What's New", "What's New", changelog_path ],
|
|
|
|
[ "Feedback", "Feedback", feedback_path ],
|
|
|
|
[ "Invite friends", "Invite friends", invites_path ]
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
test "can access settings from sidebar" do
|
|
|
|
open_settings_from_sidebar
|
|
|
|
assert_selector "h1", text: "Account"
|
|
|
|
assert_current_path settings_profile_path
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
2024-05-17 09:09:32 -04:00
|
|
|
|
2024-04-18 07:56:51 -04:00
|
|
|
def open_settings_from_sidebar
|
|
|
|
find("#user-menu").click
|
|
|
|
click_link "Settings"
|
|
|
|
end
|
|
|
|
end
|