summaryrefslogtreecommitdiff
path: root/qa/qa/page/admin
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/admin')
-rw-r--r--qa/qa/page/admin/overview/users/index.rb5
-rw-r--r--qa/qa/page/admin/overview/users/show.rb15
-rw-r--r--qa/qa/page/admin/settings/component/sign_up_restrictions.rb23
-rw-r--r--qa/qa/page/admin/settings/general.rb7
4 files changed, 50 insertions, 0 deletions
diff --git a/qa/qa/page/admin/overview/users/index.rb b/qa/qa/page/admin/overview/users/index.rb
index e374c1bf281..fea95fdb84a 100644
--- a/qa/qa/page/admin/overview/users/index.rb
+++ b/qa/qa/page/admin/overview/users/index.rb
@@ -8,6 +8,7 @@ module QA
class Index < QA::Page::Base
view 'app/views/admin/users/index.html.haml' do
element :user_search_field
+ element :pending_approval_tab
end
view 'app/views/admin/users/_user.html.haml' do
@@ -22,6 +23,10 @@ module QA
find_element(:user_search_field).set(username).send_keys(:return)
end
+ def click_pending_approval_tab
+ click_element :pending_approval_tab
+ end
+
def click_user(username)
within_element(:user_row_content, text: username) do
click_element(:username_link)
diff --git a/qa/qa/page/admin/overview/users/show.rb b/qa/qa/page/admin/overview/users/show.rb
index f15ef0492fc..f455bd31d14 100644
--- a/qa/qa/page/admin/overview/users/show.rb
+++ b/qa/qa/page/admin/overview/users/show.rb
@@ -12,17 +12,32 @@ module QA
view 'app/views/admin/users/show.html.haml' do
element :confirm_user_button
+ element :user_id_content
+ end
+
+ view 'app/views/admin/users/_approve_user.html.haml' do
+ element :approve_user_button
end
def click_impersonate_user
click_element(:impersonate_user_link)
end
+ def user_id
+ find_element(:user_id_content).text
+ end
+
def confirm_user
accept_confirm do
click_element :confirm_user_button
end
end
+
+ def approve_user
+ accept_confirm do
+ click_element :approve_user_button
+ end
+ end
end
end
end
diff --git a/qa/qa/page/admin/settings/component/sign_up_restrictions.rb b/qa/qa/page/admin/settings/component/sign_up_restrictions.rb
new file mode 100644
index 00000000000..8c5b4bf506b
--- /dev/null
+++ b/qa/qa/page/admin/settings/component/sign_up_restrictions.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Admin
+ module Settings
+ module Component
+ class SignUpRestrictions < Page::Base
+ view 'app/views/admin/application_settings/_signup.html.haml' do
+ element :require_admin_approval_after_user_signup_checkbox
+ element :save_changes_button
+ end
+
+ def require_admin_approval_after_user_signup
+ check_element :require_admin_approval_after_user_signup_checkbox
+ click_element :save_changes_button
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/page/admin/settings/general.rb b/qa/qa/page/admin/settings/general.rb
index 7e35902a778..a2457dded7c 100644
--- a/qa/qa/page/admin/settings/general.rb
+++ b/qa/qa/page/admin/settings/general.rb
@@ -9,6 +9,7 @@ module QA
view 'app/views/admin/application_settings/general.html.haml' do
element :account_and_limit_settings_content
+ element :sign_up_restrictions_settings_content
end
def expand_account_and_limit(&block)
@@ -16,6 +17,12 @@ module QA
Component::AccountAndLimit.perform(&block)
end
end
+
+ def expand_sign_up_restrictions(&block)
+ expand_content(:sign_up_restrictions_settings_content) do
+ Component::SignUpRestrictions.perform(&block)
+ end
+ end
end
end
end