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: f14ddea3e8bb65745269a3cfc0757c9b1dc93a66 (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
41
42
# frozen_string_literal: true

module QA
  module Page
    module User
      class Show < Page::Base
        view 'app/views/users/show.html.haml' do
          element :follow_user_link
          element :following_tab
        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
          return click_element(:nav_item_link, submenu_item: 'Following') if Runtime::Env.super_sidebar_enabled?

          click_element(:following_tab)
        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