debian-mirror-gitlab/spec/support/helpers/features/admin_users_helpers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
497 B
Ruby
Raw Normal View History

2021-09-30 23:02:18 +05:30
# frozen_string_literal: true
2023-06-20 00:43:36 +05:30
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
2021-09-30 23:02:18 +05:30
2023-06-20 00:43:36 +05:30
def click_action_in_user_dropdown(user_id, action)
click_user_dropdown_toggle(user_id)
2021-09-30 23:02:18 +05:30
2023-06-20 00:43:36 +05:30
within find("[data-testid='user-actions-#{user_id}']") do
find('li button', exact_text: action).click
2021-09-30 23:02:18 +05:30
end
end
end
end