Add test pilot promo (close #3615)
This commit is contained in:
Родитель
1b71363fa0
Коммит
9f75d41f24
|
@ -138,6 +138,15 @@ class WebdevCollection(CollectionPromo):
|
|||
title = _(u'Build the perfect website')
|
||||
|
||||
|
||||
class TestPilot(TemplatePromo):
|
||||
slug = 'Test Pilot'
|
||||
cls = 'promo promo-test-pilot'
|
||||
template = 'legacy_discovery/modules/testpilot.html'
|
||||
|
||||
def context(self, **kwargs):
|
||||
return {'module_context': 'discovery'}
|
||||
|
||||
|
||||
class StarterPack(CollectionPromo):
|
||||
slug = 'Starter Pack'
|
||||
collection_author, collection_slug = 'mozilla', 'starter'
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<li class="panel">
|
||||
<div class="feature promo promo-test-pilot">
|
||||
<h2>{{ _('Become a Test Pilot') }}</h2>
|
||||
<h3>{{ _('Unlock early access to experimental browser features.') }}</h3>
|
||||
|
||||
<a class="button button-green" href="https://testpilot.firefox.com/">
|
||||
{{ _('Get Started') }}
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
|
@ -478,6 +478,27 @@ class TestDownloadSources(TestCase):
|
|||
'?src=discovery-upandcoming')
|
||||
|
||||
|
||||
class TestTestPilot(TestCase):
|
||||
fixtures = ['base/users', 'base/addon_3615',
|
||||
'legacy_discovery/discoverymodules']
|
||||
|
||||
def setUp(self):
|
||||
super(TestTestPilot, self).setUp()
|
||||
self.url = reverse('discovery.pane.promos', args=['Darwin', '10.0'])
|
||||
self.addon = Addon.objects.get(id=3615)
|
||||
DiscoveryModule.objects.create(
|
||||
app=amo.FIREFOX.id, ordering=4,
|
||||
module='Test Pilot')
|
||||
|
||||
def test_testpilot(self):
|
||||
r = self.client.get(self.url)
|
||||
assert pq(r.content)('h2').text() == 'Become a Test Pilot'
|
||||
assert (pq(r.content)('h3').text() ==
|
||||
'Unlock early access to experimental browser features.')
|
||||
assert (pq(r.content)('a').attr('href') ==
|
||||
'https://testpilot.firefox.com/')
|
||||
|
||||
|
||||
class TestMonthlyPick(TestCase):
|
||||
fixtures = ['base/users', 'base/addon_3615',
|
||||
'legacy_discovery/discoverymodules']
|
||||
|
|
|
@ -655,6 +655,23 @@ body:not(.home) .amo-header,
|
|||
.promo-gray {
|
||||
background-image: url(../../img/zamboni/discovery_pane/promos-refresh/carousel-gray.png);
|
||||
}
|
||||
|
||||
.promo-test-pilot {
|
||||
background-image: url(../../img/zamboni/discovery_pane/promos-refresh/testpilot.png);
|
||||
|
||||
h2 {
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 32px;
|
||||
margin: 20px 310px 20px 0;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#promos,
|
||||
|
@ -913,7 +930,8 @@ input:not(.upvotes):not(.downvotes)[type="submit"],
|
|||
transition: box-shadow linear 0.25s;
|
||||
|
||||
&.download,
|
||||
&.add {
|
||||
&.add,
|
||||
&.button-green {
|
||||
background: #57bd35;
|
||||
box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.10),
|
||||
inset 0 -2px 0 0 rgba(56, 136, 30, 0.50);
|
||||
|
@ -1796,7 +1814,7 @@ h3.author .transfer-ownership {
|
|||
a {
|
||||
color: #0996f8 !important; //need to override .disabled a[href] color: #888!important; rule
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.persona.hovercard {
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 74 KiB |
Загрузка…
Ссылка в новой задаче