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

namespace_select.rb « component « page « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9b483162f1b16117e867c4efc48f74937427c8dc (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
# frozen_string_literal: true

module QA
  module Page
    module Component
      module NamespaceSelect
        extend QA::Page::PageConcern

        def self.included(base)
          super

          base.view "app/assets/javascripts/vue_shared/components/namespace_select/namespace_select_deprecated.vue" do
            element :namespaces_list
            element :namespaces_list_groups
            element :namespaces_list_item
            element :namespaces_list_search
          end
        end

        def select_namespace(item)
          click_element :namespaces_list

          wait_for_requests

          within_element(:namespaces_list) do
            fill_element(:namespaces_list_search, item)

            wait_for_requests

            find_element(:namespaces_list_item, text: item).click
          end
        end
      end
    end
  end
end