-
Notifications
You must be signed in to change notification settings - Fork 356
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
Remove record.id from live migrate submit and cancel buttons #2891
Remove record.id from live migrate submit and cancel buttons #2891
Conversation
@miq_bot add_label bug |
Checked commit mansam@5dfeb89 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@aufi : please, confim, this fixes the issue. Thx! |
@mansam : do you need any help with writing a simple test for this one? |
@martinpovolny Some guidance about how to write a test for this would be helpful. |
You are fixing a crash. So you can write a test that will check that the page renders ok. Create a VM. And run the request that is run then you press the button. I don't know if the id of the VM is passwd in the request or is stored beforehand in the session. You can easily see what's going on in the browser development tools. There's a grid on that page so you can check that the GTL rendering is called with the proper params. You can also check that the /report_data returns the proper VMs to be displayed in the grid. Example: https://github.com/ManageIQ/manageiq-ui-classic/pull/2842/files Ping me when you have some WIP and you need any help. |
@martinpovolny I am having trouble rendering the request outside of explorer mode. Calling session[:live_migrate_items] = [vm_openstack.id]
post :button, :params => {:pressed => 'instance_live_migrate'}
expect(response.status).to eq(200)
expect(response).to render_template(:partial => 'vm_common/_live_migrate') |
ok, @mansam, let me look if I can craft a spec tomorrow. |
…r-views Remove record.id from live migrate submit and cancel buttons (cherry picked from commit 5e3c9a5) https://bugzilla.redhat.com/show_bug.cgi?id=1524676
Gaprindashvili backport details:
|
Remove erroneous reference to
@record.id
from the submit and cancel buttons that are displayed when viewing the live migrate form outside of an explorer view. IDs of instances to migrate are tracked by@live_migrate_items
.Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1518436
Obsoletes #2877