Skip to content

Commit

Permalink
Fixed broken spec tests due to removal of an accordion
Browse files Browse the repository at this point in the history
  • Loading branch information
h-kataria committed Mar 2, 2021
1 parent ddea74d commit 5db82c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
3 changes: 1 addition & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@
tagging_edit
) +
adv_search_post +
exp_post +
x_post
exp_post
},

:configuration_script => {
Expand Down
3 changes: 3 additions & 0 deletions spec/config/routes.pending.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ AutomationManagerController:
- wait_for_task
- x_history
- x_search_by_name
AutomationManagerConfiguredSystemController:
- index
- reload
AvailabilityZoneController:
- compare_cancel
- compare_choose_base
Expand Down
14 changes: 4 additions & 10 deletions spec/controllers/automation_manager_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

get :explorer
accords = controller.instance_variable_get(:@accords)
expect(accords.size).to eq(2)
expect(accords.size).to eq(1)
breadcrumbs = controller.instance_variable_get(:@breadcrumbs)
expect(breadcrumbs[0]).to include(:url => '/automation_manager/show_list')
expect(response.status).to eq(200)
Expand All @@ -66,13 +66,13 @@
end

context "renders the explorer based on RBAC" do
it "renders explorer based on RBAC access to feature 'automation_manager_configured_system_tag'" do
login_as user_with_feature %w(automation_manager_configured_system_tag)
it "renders explorer based on RBAC access to feature 'automation_manager_refresh_provider'" do
login_as user_with_feature %w(automation_manager_refresh_provider)

get :explorer
accords = controller.instance_variable_get(:@accords)
expect(accords.size).to eq(1)
expect(accords[0][:name]).to eq("automation_manager_cs_filter")
expect(accords[0][:name]).to eq("automation_manager_providers")
expect(response.status).to eq(200)
expect(response.body).to_not be_empty
end
Expand Down Expand Up @@ -366,12 +366,6 @@
allow(controller).to receive(:x_active_tree).and_return(:automation_manager_providers_tree)
controller.send(:get_node_info, key)
end

it "fetches list for Configured Systems accordion" do
key = ems_key_for_provider(automation_provider1)
allow(controller).to receive(:x_active_tree).and_return(:automation_manager_cs_filter_tree)
controller.send(:get_node_info, key)
end
end

describe "#build_credentials" do
Expand Down

0 comments on commit 5db82c9

Please sign in to comment.