summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/registry/show.rb
blob: 03c547fc8b551f2401f4adb39d85fba4fd50280e (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 Project
      module Registry
        class Show < QA::Page::Base
          view 'app/assets/javascripts/registry/explorer/components/list_page/image_list_row.vue' do
            element :registry_image_content
          end

          view 'app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue' do
            element :tag_delete_button
          end

          def has_registry_repository?(name)
            find_element(:registry_image_content, text: name)
          end

          def click_on_image(name)
            click_element(:registry_image_content, text: name)
          end

          def has_tag?(tag_name)
            has_button?(tag_name)
          end

          def has_no_tag?(tag_name)
            has_no_button?(tag_name)
          end

          def click_delete
            click_element(:tag_delete_button)
            find_button('Delete').click
          end
        end
      end
    end
  end
end