-
Notifications
You must be signed in to change notification settings - Fork 197
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
Fix article in tooltip on update page. #2242
Conversation
bodhi/server/util.py
Outdated
title='This is a %s update'><i class='fa fa-fw %s'></i></span> \ | ||
" % (cls, kind, fontawesome) | ||
title='This is %s %s update'><i class='fa fa-fw %s'></i></span> \ | ||
" % (cls, kind_article, kind, fontawesome) |
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.
Looks like we just need to add some test coverage to this to get CI to be happy. You can add the tests at bodhi.tests.server.test_util
. I think we could probably get by with two tests. Here's some untested handy-wavy pseudocode to get you started:
def test_consonant(self):
"""Test type2icon() with a kind that starts with a consonant."""
self.assertEqual(util.type2icon('security'),
("<span class='label label-%s' data-toggle='tooltip'"
"title='This is a security update'><i class='fa fa-fw danger'></i></span> "))
def test_vowel(self):
"""Test type2icon() with a kind that starts with a vowel."""
self.assertEqual(util.type2icon('enhancement'),
("<span class='label label-%s' data-toggle='tooltip'"
"title='This is an enhancement update'><i class='fa fa-fw success'></i></span> "))
Hi @relrod, do you still want to work on this? |
I am going to add these two tests. |
Signed-off-by: Rick Elrod <[email protected]>
Signed-off-by: Randy Barlow <[email protected]>
Signed-off-by: Randy Barlow <[email protected]>
+1 |
jenkies test |
1 similar comment
jenkies test |
These patches are planned to be included in the upcoming 3.10.0 release: #2556. |
These patches have been deployed to Fedora's staging Bodhi instance: |
Signed-off-by: Rick Elrod [email protected]