add AMO Editor promo on devhub homepage (bug 710410)
This commit is contained in:
Родитель
29a9c2a07d
Коммит
7dd5bad767
|
@ -17,7 +17,7 @@
|
|||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
<section class="secondary devhub-sidebar">
|
||||
<section id="devhub-sidebar" class="secondary devhub-sidebar">
|
||||
<div class="item">
|
||||
<h3>{{ _('Calling All Add-ons!') }}</h3>
|
||||
<p>
|
||||
|
@ -27,6 +27,16 @@
|
|||
</p>
|
||||
<p><a href="{{ url('devhub.submit.1') }}" class="button">{{ _('Submit an Add-on') }}</a></p>
|
||||
</div>
|
||||
{% if amo_user.is_developer %}
|
||||
<div id="editor-promo" class="item">
|
||||
<h3>{{ _('Get Ahead!') }}</h3>
|
||||
<p>
|
||||
{{ _('Become an AMO Editor today and get your add-ons reviewed faster.') }}
|
||||
</p>
|
||||
<p><a href="https://wiki.mozilla.org/AMO:Editors" class="button">
|
||||
{{ _('Learn More') }}</a></p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include "devhub/includes/blog_posts.html" %}
|
||||
</section>
|
||||
<section id="homepage" class="primary">
|
||||
|
|
|
@ -1365,8 +1365,7 @@ class TestIssueRefund(amo.tests.TestCase):
|
|||
|
||||
|
||||
class TestDelete(amo.tests.TestCase):
|
||||
fixtures = ('base/apps', 'base/users', 'base/addon_3615',
|
||||
'base/addon_5579',)
|
||||
fixtures = ['base/addon_3615']
|
||||
|
||||
def setUp(self):
|
||||
self.addon = self.get_addon()
|
||||
|
@ -1387,6 +1386,27 @@ class TestDelete(amo.tests.TestCase):
|
|||
self.assertRaises(Addon.DoesNotExist, self.get_addon)
|
||||
|
||||
|
||||
class TestHome(amo.tests.TestCase):
|
||||
fixtures = ['base/addon_3615']
|
||||
|
||||
def setUp(self):
|
||||
assert self.client.login(username='del@icio.us', password='password')
|
||||
self.url = reverse('devhub.index')
|
||||
|
||||
def get_pq(self):
|
||||
r = self.client.get(self.url)
|
||||
eq_(r.status_code, 200)
|
||||
return pq(r.content)
|
||||
|
||||
def test_editor_promo(self):
|
||||
eq_(self.get_pq()('#devhub-sidebar #editor-promo').length, 1)
|
||||
|
||||
def test_no_editor_promo(self):
|
||||
Addon.objects.all().delete()
|
||||
# Regular users (non-devs) should not see this promo.
|
||||
eq_(self.get_pq()('#devhub-sidebar #editor-promo').length, 0)
|
||||
|
||||
|
||||
class TestActivityFeed(amo.tests.TestCase):
|
||||
fixtures = ('base/apps', 'base/users', 'base/addon_3615')
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче