Fix Breadcrumbs (bug 651263)
This commit is contained in:
Родитель
0d59e31647
Коммит
28a3a1d9a1
|
@ -61,7 +61,9 @@ def editors_breadcrumbs(context, queue=None, queue_id=None, items=None):
|
|||
crumbs = [(reverse('editors.home'), _('Editor Tools'))]
|
||||
|
||||
if queue_id:
|
||||
queue_ids = {4: 'pending', 3: 'nominated', 1: 'prelim'}
|
||||
queue_ids = {1: 'prelim', 3: 'nominated', 4: 'pending',
|
||||
8: 'prelim', 9: 'nominated', 2: 'pending'}
|
||||
|
||||
queue = queue_ids.get(queue_id, 'queue')
|
||||
|
||||
if queue:
|
||||
|
|
|
@ -1270,6 +1270,17 @@ class TestReview(ReviewBase):
|
|||
eq_(list_items.eq(0).find('a').text(), "Editor Tools")
|
||||
eq_(list_items.eq(1).find('a').text(), "Pending Updates")
|
||||
|
||||
def test_breadcrumbs_all(self):
|
||||
queues = {'Full Reviews': [3, 9],
|
||||
'Preliminary Reviews': [1, 8],
|
||||
'Pending Updates': [2, 4]}
|
||||
|
||||
for text, queue_ids in queues.items():
|
||||
for qid in queue_ids:
|
||||
self.addon.update(status=qid)
|
||||
doc = pq(self.client.get(self.url).content)
|
||||
eq_(doc('ol.breadcrumbs li:eq(1)').text(), text)
|
||||
|
||||
def test_no_compare_link(self):
|
||||
r = self.client.get(self.url)
|
||||
doc = pq(r.content)
|
||||
|
|
Загрузка…
Ссылка в новой задаче