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

index.rb « users « overview « admin « page « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f8c79b4f72c70e25fa116213a731fb206e4b60a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# frozen_string_literal: true

module QA
  module Page
    module Admin
      module Overview
        module Users
          class Index < QA::Page::Base
            view 'app/views/admin/users/_users.html.haml' do
              element :user_search_field
              element :pending_approval_tab
            end

            view 'app/views/admin/users/_user.html.haml' do
              element :user_row_content
            end

            view 'app/views/admin/users/_user_detail.html.haml' do
              element :username_link
            end

            def search_user(username)
              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_link(username)
              end
            end
          end
        end
      end
    end
  end
end