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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorTomislav Nikic <tnikic@gitlab.com>2019-07-30 11:04:26 +0300
committerMark Lapierre <mlapierre@gitlab.com>2019-07-30 11:04:26 +0300
commit7906503d97b8481cf2be1331cb4479fef3806973 (patch)
treefbeb7b2f43edda17cd2c9f88d92e30add23c6805 /qa
parent14e7cbe5813db792a4591565ea872745937e8406 (diff)
Getting on par with EE
This commit covers all the files that where changed in the identically named branch on EE that is creating an elasticsearch test case.
Diffstat (limited to 'qa')
-rw-r--r--qa/qa.rb4
-rw-r--r--qa/qa/page/admin/menu.rb12
-rw-r--r--qa/qa/page/main/menu.rb8
-rw-r--r--qa/qa/page/search/results.rb33
4 files changed, 57 insertions, 0 deletions
diff --git a/qa/qa.rb b/qa/qa.rb
index be73776425b..18fb4509dce 100644
--- a/qa/qa.rb
+++ b/qa/qa.rb
@@ -314,6 +314,10 @@ module QA
autoload :Login, 'qa/page/mattermost/login'
end
+ module Search
+ autoload :Results, 'qa/page/search/results'
+ end
+
##
# Classes describing components that are used by several pages.
#
diff --git a/qa/qa/page/admin/menu.rb b/qa/qa/page/admin/menu.rb
index eea5717f5a7..61ec9854726 100644
--- a/qa/qa/page/admin/menu.rb
+++ b/qa/qa/page/admin/menu.rb
@@ -13,6 +13,10 @@ module QA
element :admin_settings_metrics_and_profiling_item
end
+ view 'app/views/layouts/nav/sidebar/_admin.html.haml' do
+ element :integration_settings_link
+ end
+
def go_to_repository_settings
hover_settings do
within_submenu do
@@ -21,6 +25,14 @@ module QA
end
end
+ def go_to_integration_settings
+ hover_settings do
+ within_submenu do
+ click_element :integration_settings_link
+ end
+ end
+ end
+
def go_to_general_settings
hover_settings do
within_submenu do
diff --git a/qa/qa/page/main/menu.rb b/qa/qa/page/main/menu.rb
index d86d554356e..e3039149ab4 100644
--- a/qa/qa/page/main/menu.rb
+++ b/qa/qa/page/main/menu.rb
@@ -27,6 +27,10 @@ module QA
element :your_projects_link
end
+ view 'app/views/layouts/_search.html.haml' do
+ element :search_term_field
+ end
+
def go_to_groups
within_top_menu do
click_element :groups_dropdown
@@ -71,6 +75,10 @@ module QA
click_element :snippets_link
end
+ def search_for(term)
+ fill_element :search_term_field, "#{term}\n"
+ end
+
def has_personal_area?(wait: Capybara.default_max_wait_time)
has_element?(:user_avatar, wait: wait)
end
diff --git a/qa/qa/page/search/results.rb b/qa/qa/page/search/results.rb
new file mode 100644
index 00000000000..b9b18abf660
--- /dev/null
+++ b/qa/qa/page/search/results.rb
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+module QA::Page
+ module Search
+ class Results < QA::Page::Base
+ view 'app/views/search/_category.html.haml' do
+ element :code_tab
+ end
+
+ view 'app/views/search/results/_blob_data.html.haml' do
+ element :result_item_content
+ element :file_title_content
+ element :file_text_content
+ end
+
+ def switch_to_code
+ click_element(:code_tab)
+ end
+
+ def has_file_in_project?(file_name, project_name)
+ has_element? :result_item_content, text: "#{project_name}: #{file_name}"
+ end
+
+ def has_file_with_content?(file_name, file_text)
+ within_element_by_index :result_item_content, 0 do
+ false unless has_element? :file_title_content, text: file_name
+
+ has_element? :file_text_content, text: file_text
+ end
+ end
+ end
+ end
+end