Welcome to mirror list, hosted at ThFree Co, Russian Federation.

admin_users_helpers.rb « features « helpers « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9a87ccf113aaaed2abda8f06fac573dc083b5922 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

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