summaryrefslogtreecommitdiff
path: root/spec/support/helpers/features/admin_users_helpers.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 09:55:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 09:55:51 +0000
commite8d2c2579383897a1dd7f9debd359abe8ae8373d (patch)
treec42be41678c2586d49a75cabce89322082698334 /spec/support/helpers/features/admin_users_helpers.rb
parentfc845b37ec3a90aaa719975f607740c22ba6a113 (diff)
downloadgitlab-ce-8ed83bb76a87aac2ee8eb7e232a630a2b534ad93.tar.gz
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/support/helpers/features/admin_users_helpers.rb')
-rw-r--r--spec/support/helpers/features/admin_users_helpers.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/support/helpers/features/admin_users_helpers.rb b/spec/support/helpers/features/admin_users_helpers.rb
new file mode 100644
index 00000000000..99b19eedcff
--- /dev/null
+++ b/spec/support/helpers/features/admin_users_helpers.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+module Spec
+ module Support
+ module Helpers
+ module Features
+ module AdminUsersHelpers
+ def click_user_dropdown_toggle(user_id)
+ page.within("[data-testid='user-actions-#{user_id}']") do
+ find("[data-testid='dropdown-toggle']").click
+ end
+ end
+
+ def click_action_in_user_dropdown(user_id, action)
+ click_user_dropdown_toggle(user_id)
+
+ within find("[data-testid='user-actions-#{user_id}']") do
+ find('li button', exact_text: action).click
+ end
+ end
+ end
+ end
+ end
+ end
+end