Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
do not show editor pitch on apps completion page (bug 715031)
Browse files Browse the repository at this point in the history
  • Loading branch information
cvan committed Jan 4, 2012
1 parent 5d6f69b commit e4a387b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
20 changes: 11 additions & 9 deletions apps/devhub/templates/devhub/addons/submit/done.html
Expand Up @@ -52,17 +52,19 @@ <h3>{{ _("You're done!") }}</h3>
</ul>
</div>

<div class="action-needed">
<h3>{{ _('Get Ahead in the Review Queue!') }}</h3>
<p>
{{ _('Become an AMO Editor today and get your add-ons reviewed faster.') }}
<a class="button learn-more" href="https://wiki.mozilla.org/AMO:Editors">
{{ _('Learn More') }}</a>
</p>
</div>
{% if not webapp %}
<div id="editor-pitch" class="action-needed">
<h3>{{ _('Get Ahead in the Review Queue!') }}</h3>
<p>
{{ _('Become an AMO Editor today and get your add-ons reviewed faster.') }}
<a class="button learn-more" href="https://wiki.mozilla.org/AMO:Editors">
{{ _('Learn More') }}</a>
</p>
</div>
{% endif %}

{% if waffle.switch('marketplace') and addon.type in amo.ADDON_BECOME_PREMIUM %}
<div class="action-needed">
<div id="marketplace-enroll" class="action-needed">
<h3>{{ _('Enrolling in Marketplace') }}</h3>
{% with doc_url=url('devhub.docs', doc_name='marketplace'),
payments_url=addon.get_dev_url('payments') %}
Expand Down
13 changes: 11 additions & 2 deletions apps/devhub/tests/test_views.py
Expand Up @@ -2369,16 +2369,25 @@ def test_display_non_ascii_url(self):
u'%s/en-US/firefox/addon/%s/' % (
settings.SITE_URL, u.decode('utf8')))

def test_addon_editor_pitch(self):
res = self.client.get(self.url)
eq_(pq(res.content)('#editor-pitch').length, 1)

def test_app_editor_pitch(self):
self.addon.update(type=amo.ADDON_WEBAPP)
res = self.client.get(self.url)
eq_(pq(res.content)('#editor-pitch').length, 0)

@mock.patch.dict(jingo.env.globals['waffle'], {'switch': lambda x: True})
def test_marketplace(self):
res = self.client.get(self.url)
eq_(pq(res.content)('.action-needed').length, 2)
eq_(pq(res.content)('#marketplace-enroll').length, 1)

@mock.patch.dict(jingo.env.globals['waffle'], {'switch': lambda x: True})
def test_marketplace_not(self):
self.addon.update(type=amo.ADDON_SEARCH)
res = self.client.get(self.url)
eq_(pq(res.content)('.action-needed').length, 1)
eq_(pq(res.content)('#marketplace-enroll').length, 0)


class TestResumeStep(TestSubmitBase):
Expand Down

0 comments on commit e4a387b

Please sign in to comment.