summaryrefslogtreecommitdiff
path: root/qa/qa/page/profile/two_factor_auth.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/profile/two_factor_auth.rb')
-rw-r--r--qa/qa/page/profile/two_factor_auth.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/qa/qa/page/profile/two_factor_auth.rb b/qa/qa/page/profile/two_factor_auth.rb
index a3ff5f603fa..b5a4d04b377 100644
--- a/qa/qa/page/profile/two_factor_auth.rb
+++ b/qa/qa/page/profile/two_factor_auth.rb
@@ -8,9 +8,35 @@ module QA
element :configure_it_later_button
end
+ view 'app/views/profiles/two_factor_auths/show.html.haml' do
+ element :otp_secret_content
+ element :pin_code_field
+ element :register_2fa_app_button
+ end
+
+ view 'app/views/profiles/two_factor_auths/_codes.html.haml' do
+ element :proceed_button
+ end
+
def click_configure_it_later_button
click_element :configure_it_later_button
end
+
+ def otp_secret_content
+ find_element(:otp_secret_content).text.gsub('Key:', '').delete(' ')
+ end
+
+ def set_pin_code(pin_code)
+ fill_element(:pin_code_field, pin_code)
+ end
+
+ def click_register_2fa_app_button
+ click_element :register_2fa_app_button
+ end
+
+ def click_proceed_button
+ click_element :proceed_button
+ end
end
end
end