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

show.rb « user « page « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 62e08dc8c631229e9b2d72ae9ea03d416ac7b97d (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
# frozen_string_literal: true

module QA
  module Page
    module User
      class Show < Page::Base
        view 'app/views/users/_follow_user.html.haml' do
          element 'follow-user-link'
        end

        view 'app/views/shared/users/_user.html.haml' do
          element :user_link
        end

        view 'app/views/users/_overview.html.haml' do
          element 'user-activity-content'
        end

        def click_follow_user_link
          click_element('follow-user-link')
        end

        def click_following_tab
          click_element(:nav_item_link, submenu_item: 'Following')
        end

        def click_user_link(username)
          click_element(:user_link, username: username)
        end

        def has_activity?(activity)
          within_element('user-activity-content') do
            has_text?(activity)
          end
        end
      end
    end
  end
end