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: ad2de331ad949c475188baf4b78c138bd3035795 (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 User
      class Show < Page::Base
        view 'app/views/users/show.html.haml' do
          element :follow_user_link
          element :following_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_link
          click_element(:following_link)
        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