forked from ManageIQ/manageiq-ui-classic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display Submit,Cancel button for Evacuate Instances in a nested list
Issue: ManageIQ#6480 Remove %div_for_paging, render angular 'custom_form_buttons_controller_as' partial for buttons which works for both explorer and non-explorer screens, hide form_buttons_div and paging_div. Redirect to proper screen after evacuating Instances in a nested list.
- Loading branch information
Hilda Stastna
committed
Mar 31, 2020
1 parent
b9ea765
commit 59d9e72
Showing
5 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
spec/controllers/mixins/actions/vm_actions/evacuate_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
describe Mixins::Actions::VmActions::Evacuate do | ||
describe '#evacuate_vm' do | ||
let(:controller) { VmCloudController.new } | ||
|
||
before do | ||
allow(controller).to receive(:assert_privileges) | ||
allow(controller).to receive(:replace_right_cell) | ||
controller.instance_variable_set(:@sb, :explorer => true) | ||
controller.params = {} | ||
end | ||
|
||
it 'sets @sb[:explorer] back to nil after canceling/submitting evacuating selected Instances' do | ||
controller.send(:evacuate_vm) | ||
expect(controller.instance_variable_get(:@sb)[:explorer]).to be_nil | ||
end | ||
end | ||
end |