UX: move "hide profile" checkbox to profile tab (#31095)

This moves the "hide my public profile" checkbox from the
/my/preferences/interface > other section into the top of the
/my/preferences/profile section.

Internal ref - t/146570
This commit is contained in:
Régis Hanol
2025-01-31 17:04:20 +01:00
committed by GitHub
parent 853564f859
commit b11fd010fe
7 changed files with 68 additions and 9 deletions

View File

@@ -8,6 +8,14 @@ module PageObjects
self
end
def hide_profile
find(".user-hide-profile .pref-hide-profile").click
end
def has_hidden_profile?
has_css?(".user-hide-profile .pref-hide-profile input[type=checkbox]:checked")
end
def expand_profile_details
find(".user-main .details .controls .btn-default").click
end

View File

@@ -19,6 +19,19 @@ describe "User preferences | Profile", type: :system do
end
end
describe "hiding profile" do
it "allows user to hide their profile" do
SiteSetting.allow_users_to_hide_profile = true
user_preferences_profile_page.visit(user)
user_preferences_profile_page.hide_profile
user_preferences_profile_page.save
page.refresh
expect(user_preferences_profile_page).to have_hidden_profile
end
end
describe "enforcing required fields" do
before do
UserRequiredFieldsVersion.create!