Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EUWE] Advanced search not working for the ansible job #12719

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ def show_adv_search?
ontap_file_share ontap_logical_disk ontap_storage_system ontap_storage_volume
ems_network security_group floating_ip cloud_subnet network_router network_port cloud_network
ems_storage load_balancer
orchestration_stack resource_pool retired service configuration_job
orchestration_stack resource_pool retired service configuration_job configuration_scripts
snia_local_file_system storage_manager templates vm)
(@lastaction == "show_list" && !session[:menu_click] && show_search.include?(@layout) && !@in_a_form) ||
(@explorer && x_tree && tree_with_advanced_search? && !@record)
Expand Down
16 changes: 16 additions & 0 deletions spec/helpers/application_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,22 @@
result = helper.show_adv_search?
expect(result).to be_truthy
end

it 'should return true for configuration scripts tree' do
controller.instance_variable_set(:@explorer, true)
controller.instance_variable_set(:@sb,
:active_tree => :configuration_scripts_tree,
:trees => {
:configuration_scripts_tree => {
:tree => :configuration_scripts_tree,
:type => :configuration_scripts
}
}
)
allow(helper).to receive(:tree_with_advanced_search?).and_return(true)
result = helper.show_adv_search?
expect(result).to be_truthy
end
end

context "#show_advanced_search?" do
Expand Down