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
Passing capacity hash to values broke PV screen #4245
Passing capacity hash to values broke PV screen #4245
Conversation
Ideally this would show "10G". |
@nimrodshn : Thank you for the fix. This is obviously a regression that I caused while converting all the detail screens to use React components for display. I wonder what is the best way to test this. I mean we have so many screens like this one and very little test coverage. It's impossible to test all of them when something changes and also it's easy to break if there's no test. Now the javascript components have a interface with some type descriptions (using PropTypes) and there are classes on the Ruby side. It should be no big deal to have a simple test for this screen. |
@martinpovolny Do you mind pointing out to some relevant tests? I haven't touched on miq code in a while.. |
That's what I am wondering about. What it the best way. Now the components have their own tests -- https://github.com/ManageIQ/react-ui-components/tree/master/src/textual_summary/tests -- that is for the rendering part. We can test that for a given
In that place and to stay in the Ruby world what is important is that the result of
is what is expected. From there the data is passed to the React component and the rendering of that data should be covered by So I think that the best would be to have an example record -- a Previously we had a few (and ugly) tests that matched text in the page. Nothing really systematic I am afraid. p.s. @nimrodshn : I don't want to force you to solve this in this PR and block you from other work, but I'd like to have a clear path forward and a way to limit regressions in the future. @skateman : What do you think? Can you help with this? |
@nimrodshn : here's a deal.
Does it work for you? |
Restarting travis. |
Please, fix the style issues, then I can merge this. |
8673eb1
to
52d86fa
Compare
@martinpovolny you have yourself a deal my friend 😸 👍 (Lets talk privately on gitter) |
Checked commit nimrodshn@52d86fa with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@martinpovolny
In current version of kubernetes there is only one key in :capacity hash (namely storage) although the UI shouldn't assume this. So calling |
Thx! |
Passing capacity hash to values broke the PV summary screen - table rows are expected to be an array.
cc: @cben @himdel @martinpovolny @oourfali
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1594567
Before:
After: