mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 02:53:10 +08:00

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
37 lines
835 B
Ruby
37 lines
835 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class UserPreferencesProfile < PageObjects::Pages::Base
|
|
def visit(user)
|
|
page.visit("/u/#{user.username}/preferences/profile")
|
|
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
|
|
|
|
def fill_bio(with:)
|
|
find(".bio-composer .d-editor-input").fill_in(with:)
|
|
end
|
|
|
|
def save
|
|
find(".save-button .btn-primary").click
|
|
end
|
|
|
|
def cooked_bio
|
|
find(".user-main .details .primary .bio")
|
|
end
|
|
end
|
|
end
|
|
end
|