Skip to content
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

Merged
merged 3 commits into from
Jul 23, 2018
Merged

Fix article in tooltip on update page. #2242

merged 3 commits into from
Jul 23, 2018

Conversation

relrod
Copy link
Member

@relrod relrod commented Mar 23, 2018

Signed-off-by: Rick Elrod [email protected]

@fedora-infra fedora-infra deleted a comment from centos-ci Mar 26, 2018
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)
Copy link
Contributor

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> "))

@bowlofeggs
Copy link
Contributor

Hi @relrod, do you still want to work on this?

@bowlofeggs
Copy link
Contributor

I am going to add these two tests.

@relrod relrod requested a review from a team as a code owner July 23, 2018 19:30
@relrod
Copy link
Member Author

relrod commented Jul 23, 2018

+1

@bowlofeggs
Copy link
Contributor

jenkies test

1 similar comment
@bowlofeggs
Copy link
Contributor

jenkies test

@mergify mergify bot merged commit de4b2c0 into develop Jul 23, 2018
@bowlofeggs bowlofeggs deleted the article branch August 17, 2018 14:20
@bowlofeggs
Copy link
Contributor

These patches are planned to be included in the upcoming 3.10.0 release: #2556.

@bowlofeggs
Copy link
Contributor

These patches have been deployed to Fedora's staging Bodhi instance:

https://bodhi.stg.fedoraproject.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants