2023-09-03 22:07:20 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module PageObjects
|
|
|
|
module Pages
|
|
|
|
class UserPreferencesSecurity < PageObjects::Pages::Base
|
|
|
|
def visit(user)
|
|
|
|
page.visit("/u/#{user.username}/preferences/security")
|
|
|
|
self
|
|
|
|
end
|
|
|
|
|
|
|
|
def visit_second_factor(password)
|
2023-11-07 11:26:10 -05:00
|
|
|
click_button "Manage Two-Factor Authentication"
|
2023-09-03 22:07:20 -04:00
|
|
|
|
2023-11-07 11:26:10 -05:00
|
|
|
find(".dialog-body input#password").fill_in(with: password)
|
|
|
|
find(".dialog-body .btn-primary").click
|
2023-09-03 22:07:20 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|