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

show.rb « commit « project « page « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f732eb6565ed5ee40cd86e6d5dd2e7361065d3ce (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 Project
      module Commit
        class Show < Page::Base
          view 'app/views/projects/commit/_commit_box.html.haml' do
            element :commit_sha_content
          end

          view 'app/assets/javascripts/projects/commit/components/commit_options_dropdown.vue' do
            element :options_button
            element :cherry_pick_button
            element :email_patches
            element :plain_diff
          end

          def cherry_pick_commit
            click_element(:options_button)
            click_element(:cherry_pick_button, Page::Component::CommitModal)
            click_element(:submit_commit_button)
          end

          def select_email_patches
            click_element :options_button
            visit_link_in_element :email_patches
          end

          def select_plain_diff
            click_element :options_button
            visit_link_in_element :plain_diff
          end

          def commit_sha
            find_element(:commit_sha_content).text
          end
        end
      end
    end
  end
end