mirror of
https://github.com/we-promise/sure.git
synced 2026-04-17 19:14:11 +00:00
First cut of a simplified "intro" UI layout (#265)
* First cut of a simplified "intro" UI layout * Linter * Add guest role and intro-only access * Fix guest role UI defaults (#940) Use enum predicate to avoid missing role helper. * Remove legacy user role mapping (#941) Drop the unused user role references in role normalization and SSO role mapping forms to avoid implying a role that never existed. Refs: #0 * Remove role normalization (#942) Remove role normalization Roles are now stored directly without legacy mappings. * Revert role mapping logic * Remove `normalize_role_settings` * Remove unnecessary migration * Make `member` the default * Broken `.erb` --------- Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ class Settings::ProfilesControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
@admin = users(:family_admin)
|
||||
@member = users(:family_member)
|
||||
@intro_user = users(:intro_user)
|
||||
end
|
||||
|
||||
test "should get show" do
|
||||
@@ -12,6 +13,19 @@ class Settings::ProfilesControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "intro user sees profile without settings navigation" do
|
||||
sign_in @intro_user
|
||||
get settings_profile_path
|
||||
|
||||
assert_response :success
|
||||
assert_select "#mobile-settings-nav", count: 0
|
||||
assert_select "h2", text: I18n.t("settings.profiles.show.household_title"), count: 0
|
||||
assert_select "[data-action='app-layout#openMobileSidebar']", count: 0
|
||||
assert_select "[data-action='app-layout#closeMobileSidebar']", count: 0
|
||||
assert_select "[data-action='app-layout#toggleLeftSidebar']", count: 0
|
||||
assert_select "[data-action='app-layout#toggleRightSidebar']", count: 0
|
||||
end
|
||||
|
||||
test "admin can remove a family member" do
|
||||
sign_in @admin
|
||||
assert_difference("User.count", -1) do
|
||||
|
||||
Reference in New Issue
Block a user