Commit d45a96c1 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'egb-fix-expand-button-es' into 'master'

Fix navigation to Advanced Search submenu in test

See merge request gitlab-org/gitlab!61763
parents 670b4fc1 57b523fb
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
.settings-header .settings-header
%h4 %h4
= _('Advanced Search') = _('Advanced Search')
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button', data: { qa_selector: 'expand_advanced_search_button' } }
= expanded_by_default? ? _('Collapse') : _('Expand') = expanded_by_default? ? _('Collapse') : _('Expand')
%p %p
= _('Configure settings for Advanced Search with Elasticsearch.') = _('Configure settings for Advanced Search with Elasticsearch.')
......
...@@ -12,12 +12,17 @@ module QA ...@@ -12,12 +12,17 @@ module QA
element :search_checkbox element :search_checkbox
element :url_field element :url_field
element :submit_button element :submit_button
element :expand_advanced_search_button
end end
def check_indexing def check_indexing
check_element(:indexing_checkbox) check_element(:indexing_checkbox)
end end
def has_no_indexing_checkbox_element?
has_no_element?(:indexing_checkbox)
end
def check_search def check_search
check_element(:search_checkbox) check_element(:search_checkbox)
end end
...@@ -29,6 +34,10 @@ module QA ...@@ -29,6 +34,10 @@ module QA
def click_submit def click_submit
click_element(:submit_button) click_element(:submit_button)
end end
def click_expand_advanced_search
click_element(:expand_advanced_search_button)
end
end end
end end
end end
......
...@@ -19,6 +19,10 @@ module QA ...@@ -19,6 +19,10 @@ module QA
QA::Page::Main::Menu.perform(&:go_to_admin_area) QA::Page::Main::Menu.perform(&:go_to_admin_area)
QA::Page::Admin::Menu.perform(&:go_to_advanced_search) QA::Page::Admin::Menu.perform(&:go_to_advanced_search)
QA::EE::Page::Admin::Settings::Component::Elasticsearch.perform do |es| QA::EE::Page::Admin::Settings::Component::Elasticsearch.perform do |es|
if es.has_no_indexing_checkbox_element?
es.click_expand_advanced_search
end
es.check_indexing if @es_indexing es.check_indexing if @es_indexing
es.check_search if @es_enabled es.check_search if @es_enabled
es.enter_link(@es_url) es.enter_link(@es_url)
......
...@@ -13,13 +13,15 @@ module QA ...@@ -13,13 +13,15 @@ module QA
end end
end end
before do before(:all) do
Flow::Login.while_signed_in_as_admin do Flow::Login.while_signed_in_as_admin do
QA::EE::Resource::Settings::Elasticsearch.fabricate_via_browser_ui! QA::EE::Resource::Settings::Elasticsearch.fabricate_via_browser_ui!
end end
Runtime::Search.assert_elasticsearch_responding Runtime::Search.assert_elasticsearch_responding
end
before do
Flow::Login.sign_in Flow::Login.sign_in
Resource::Repository::ProjectPush.fabricate! do |push| Resource::Repository::ProjectPush.fabricate! do |push|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment