-
Notifications
You must be signed in to change notification settings - Fork 357
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
Use dialog-user component for more custom button object types #4374
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
:cancel_endpoint => "/availability_zone" | ||
) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see 15 it
blocks doing very similar thing, just with different parameters. Could this be turned into a shared example perhaps? Or something else by using parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mzazrivec Good call, easy fix with a shared example, will do that. 👍
665f9ef
to
8ac805a
Compare
context "when the object is a AvailabilityZone" do | ||
let(:obj) { double(:class => ManageIQ::Providers::Vmware::InfraManager::AvailabilityZone, :id => 123) } | ||
|
||
it_behaves_like "DialogLocalService#determine_dialog_locals_for_custom_button returning a hash", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use include_examples
instead of it_behaves_like
.
@eclarizio I made a note to work with QE once this PR is merged. |
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1597914 This PR adds support with the dialog-user component for the following custom button object types: AvailabilityZone ContainerGroup ContainerImage ContainerProject ContainerTemplate ContainerVolume LoadBalancer NetworkRouter OrchestrationStack SecurityGroup Switch
Checked commits eclarizio/manageiq-ui-classic@65281ac~...d889ab8 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 spec/services/dialog_local_service_spec.rb
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use dialog-user component for more custom button object types
Related to #3439
This PR adds support with the dialog-user component for the following custom button object types:
AvailabilityZone
ContainerGroup
ContainerImage
ContainerProject
ContainerTemplate
ContainerVolume
LoadBalancer
NetworkRouter
OrchestrationStack
SecurityGroup
Switch
I also refactored the case statement a bit, since a lot of these new objects were simple, so basically now unless something needs special handling, it will fall through to the
else
part of the case statement and default to changing something likeAvailabilityZone
intoavailability_zones
for the API collection name and"/availability_zone"
for the UI cancel endpoint.Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1597914
/cc @gmcculloug
@d-m-u Can you review, please?
@tinaafitz Do you think you can help set up something with QE so we can test all of these new object types with custom buttons? I was able to test a few of them locally but the others I don't have the data for and not sure how to set them up properly.
@miq-bot assign @h-kataria
@miq-bot add_label enhancement, automation/automate