-
Notifications
You must be signed in to change notification settings - Fork 897
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
[GAPRINDASHVILI] Set checkbox on load, sans default, to be false, not nil #17810
Conversation
@miq-bot add_label bug |
Uuum, I'mma say that |
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.
#initialize_value_context
isn't meant to return a value, it's just meant to set up the @value
instance variable. I think your specs need to call the method, and then you should simply be able to call dialog_field.value
to check that the value was properly assigned. That was the my main goal of using the #initialize_value_context
, since #value
used to be used as not only a getter but also with a bunch of logic that we didn't want in there executing when we weren't sure it was executing.
it "returns automate vals" do | ||
dialog_field.initialize_value_context | ||
|
||
expect(dialog_field.value).to be_truthy |
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 know this has to do with our wonky "t" or "f", but it's kind of confusing that we're expecting a be_truthy
for an "f". Technically, that's correct, but it's also correct if the default value is a "t" (as shown in the next spec down).
I think both of those specs should probably be changed from be_truthy
to what the value is really supposed to be.
Checked commit d-m-u@6192982 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Once again, I'mma say that |
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.
Agreed, not sure why that one spec is failing.
¯\_(ツ)_/¯
@d-m-u Just noticed this PR... is there a corresponding 'master' PR for this? |
@simaishi No, one isn't necessary, I believe it works on master. |
Non-dynamic dialog field checkboxes without a default should load with value false, not nil.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1610685