summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/fork/new.rb
blob: bbdd4748f5c59ec61e89f2c069edc459cd15b141 (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
# frozen_string_literal: true

module QA
  module Page
    module Project
      module Fork
        class New < Page::Base
          view 'app/views/projects/forks/_fork_button.html.haml' do
            element :fork_namespace_button
          end

          view 'app/assets/javascripts/pages/projects/forks/new/components/fork_groups_list.vue' do
            element :fork_groups_list_search_field
          end

          def choose_namespace(namespace = Runtime::Namespace.path)
            click_element(:fork_namespace_button, name: namespace)
          end

          def search_for_group(group_name)
            find_element(:fork_groups_list_search_field).set(group_name)
          end
        end
      end
    end
  end
end