Skip to content

Commit

Permalink
Display Submit,Cancel button for Evacuate Instances in a nested list
Browse files Browse the repository at this point in the history
  • Loading branch information
Hilda Stastna committed Mar 17, 2020
1 parent 9c0979e commit 18b97f5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/layouts/angular/_paging_div_buttons.html.haml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
%div#angular_paging_div_buttons
#angular_paging_div_buttons{:align => 'right'}
1 change: 1 addition & 0 deletions app/views/vm/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
= render :partial => "vm_common/live_migrate"
- elsif @evacuate
= render :partial => "vm_common/evacuate"
= render :partial => 'layouts/angular/paging_div_buttons'
- elsif @associate_floating_ip
= render :partial => "vm_common/associate_floating_ip"
- elsif @disassociate_floating_ip
Expand Down
14 changes: 14 additions & 0 deletions spec/views/vm/_show.html.haml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

let(:vm) { FactoryBot.create(:vm, :name => 'vm', :description => 'vm description') }
let(:action) { 'show' }
let(:showtype) { nil }

before do
assign(:record, vm)
Expand All @@ -27,4 +28,17 @@
expect(rendered).to render_template(:partial => 'vm_common/policies', :locals => {:controller => 'vm'})
end
end

context 'evacuating Instances displayed in a nested list' do
before do
allow(view).to receive(:render_gtl_outer)
assign(:evacuate, true)
assign(:evacuate_items, [])
end

it 'renders partial layouts/angular/paging_div_buttons' do
render
expect(rendered).to include("<div align='right' id='angular_paging_div_buttons'>")
end
end
end

0 comments on commit 18b97f5

Please sign in to comment.