Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make docs in Auth48 state visually distinct. Fixes #2925. Commit read…
…y for merge. - Legacy-Id: 18189
- Loading branch information
1 parent
6e97a89
commit abe97ee
Showing
4 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from ietf.doc.factories import WgDraftFactory | ||
from ietf.doc.templatetags.ballot_icon import state_alert_badge | ||
from ietf.utils.test_utils import TestCase | ||
|
||
|
||
class BallotIconTests(TestCase): | ||
def test_state_alert_badge_marks_auth48(self): | ||
draft = WgDraftFactory(states=[ | ||
('draft','active'), | ||
('draft-iesg','rfcqueue'), | ||
('draft-rfceditor', 'auth48'), | ||
]) | ||
output = state_alert_badge(draft) | ||
self.assertIn('AUTH48', output) | ||
|
||
def test_state_alert_badge_ignores_others(self): | ||
# If the state_alert_badge() method becomes more complicated, more | ||
# sophisticated testing can be added. | ||
# For now, just test a couple states that should not be marked. | ||
draft = WgDraftFactory(states=[ | ||
('draft', 'active'), | ||
('draft-iesg', 'approved'), # not in rfcqueue state | ||
('draft-rfceditor', 'auth48'), | ||
]) | ||
output = state_alert_badge(draft) | ||
self.assertEqual('', output) | ||
|
||
draft = WgDraftFactory(states=[ | ||
('draft', 'active'), | ||
('draft-iesg', 'rfcqueue'), | ||
('draft-rfceditor', 'auth48-done'), # not in auth48 state | ||
]) | ||
output = state_alert_badge(draft) | ||
self.assertEqual('', output) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters