Commit 57b523fb authored by Erick Banks's avatar Erick Banks Committed by Sanad Liaquat

Fix navigation to Advanced Search submenu in test

parent 6330a060
......@@ -7,7 +7,7 @@
.settings-header
%h4
= _('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')
%p
= _('Configure settings for Advanced Search with Elasticsearch.')
......
......@@ -12,12 +12,17 @@ module QA
element :search_checkbox
element :url_field
element :submit_button
element :expand_advanced_search_button
end
def check_indexing
check_element(:indexing_checkbox)
end
def has_no_indexing_checkbox_element?
has_no_element?(:indexing_checkbox)
end
def check_search
check_element(:search_checkbox)
end
......@@ -29,6 +34,10 @@ module QA
def click_submit
click_element(:submit_button)
end
def click_expand_advanced_search
click_element(:expand_advanced_search_button)
end
end
end
end
......
......@@ -19,6 +19,10 @@ module QA
QA::Page::Main::Menu.perform(&:go_to_admin_area)
QA::Page::Admin::Menu.perform(&:go_to_advanced_search)
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_search if @es_enabled
es.enter_link(@es_url)
......
......@@ -13,13 +13,15 @@ module QA
end
end
before do
before(:all) do
Flow::Login.while_signed_in_as_admin do
QA::EE::Resource::Settings::Elasticsearch.fabricate_via_browser_ui!
end
Runtime::Search.assert_elasticsearch_responding
end
before do
Flow::Login.sign_in
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