only show marketplace stuff for addons that can become premium (bug 687995)
This commit is contained in:
Родитель
576151577f
Коммит
177c2a60ea
|
@ -46,7 +46,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
{% if waffle.switch('marketplace') %}
|
||||
{% if waffle.switch('marketplace') and addon.type in [amo.ADDON_EXTENSION, amo.ADDON_WEBAPP] %}
|
||||
<div class="action-needed">
|
||||
<h3>{{ _('Enrolling in Marketplace') }}</h3>
|
||||
<p>{% trans doc_url=url('devhub.docs', doc_name='marketplace'),
|
||||
|
|
|
@ -2856,7 +2856,14 @@ class TestSubmitStep7(TestSubmitBase):
|
|||
def test_marketplace(self):
|
||||
addon = Addon.objects.get(pk=3615)
|
||||
res = self.client.get(reverse('devhub.submit.7', args=[addon.slug]))
|
||||
assert 'If this is a premium add-on' in res.content
|
||||
eq_(pq(res.content)('.action-needed').length, 1)
|
||||
|
||||
@mock.patch.dict(jingo.env.globals['waffle'], {'switch': lambda x: True})
|
||||
def test_marketplace_not(self):
|
||||
addon = Addon.objects.get(pk=3615)
|
||||
addon.update(type=amo.ADDON_SEARCH)
|
||||
res = self.client.get(reverse('devhub.submit.7', args=[addon.slug]))
|
||||
eq_(pq(res.content)('.action_needed').length, 0)
|
||||
|
||||
|
||||
class TestResumeStep(TestSubmitBase):
|
||||
|
|
Загрузка…
Ссылка в новой задаче