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

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

module QA
  module Page
    module File
      class Show < Page::Base
        include Shared::CommitMessage
        include Project::SubMenus::Settings
        include Project::SubMenus::Common
        include Layout::Flash
        include Page::Component::BlobContent

        view 'app/assets/javascripts/repository/components/blob_button_group.vue' do
          element :lock_button
        end

        view 'app/assets/javascripts/vue_shared/components/web_ide_link.vue' do
          element :edit_button
        end

        view 'app/assets/javascripts/vue_shared/components/actions_button.vue' do
          element :action_dropdown
          element :edit_menu_item, ':data-qa-selector="`${action.key}_menu_item`"' # rubocop:disable QA/ElementWithPattern
        end

        def click_edit
          within_element(:action_dropdown) do
            click_button(class: 'dropdown-toggle-split')
            click_element(:edit_menu_item)
            click_element(:edit_button)
          end
        end

        def click_delete
          click_on 'Delete'
        end

        def click_delete_file
          click_on 'Delete file'
        end
      end
    end
  end
end

QA::Page::File::Show.prepend_mod_with('Page::File::Show', namespace: QA)