2024-06-25 19:32:18 +08:00
|
|
|
# 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
|
2024-07-05 12:31:57 +02:00
|
|
|
|
2025-01-31 17:04:20 +01:00
|
|
|
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
|
|
|
|
|
2024-07-05 12:31:57 +02:00
|
|
|
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
|
2024-06-25 19:32:18 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|