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

Commit

Permalink
Test for anon getting sign up button
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed May 31, 2017
1 parent ab7fad6 commit 33cdf30
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
6 changes: 6 additions & 0 deletions scss/components/text-treatments.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
}
}

.instructions {
text-align: center;
margin: 0 0 30px;
font-family: $Ideal;
}

.sorry {
text-align: center;
font: normal 12px/15px $Ideal;
Expand Down
6 changes: 0 additions & 6 deletions scss/pages/package.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#package #content {
text-align: center;

.instructions {
text-align: center;
margin: 0 0 30px;
font-family: $Ideal;
}

.selected .icon { display: block; }
.icon {
display: none;
Expand Down
11 changes: 11 additions & 0 deletions tests/ttw/test_package_claiming.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,14 @@ def test_jdorfman_can_merge_accounts(self):
payload = eval(self.css('table#events td.payload').text)
assert payload['action'] == 'take-over'
assert payload['values']['exchange_routes'] == [r.id for r in jdorfman.get_payout_routes()]


class BulkClaiming(BrowserHarness):

def setUp(self):
self.make_package()
self.make_package(name='bar', description='Bar barringly')

def test_anon_gets_sign_in_prompt(self):
self.visit('/on/npm/')
assert self.css('.important-button button').text == 'Sign in / Sign up'
3 changes: 1 addition & 2 deletions www/on/npm/index.html.spt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[---]
banner = "npm"
page_id = "package"
suppress_sidebar = True
npackages, Npackages = website.db.one('''
select (select count(*) from teams_to_packages) as n, (select count(*) from packages) as t
Expand All @@ -21,7 +20,7 @@ npackages, Npackages = website.db.one('''
</p>

{% if user.ANON %}
<div class="button-wrapper">
<div class="important-button">
{{ sign_in_using(button_class='large') }}
</div>
{% else %}
Expand Down

0 comments on commit 33cdf30

Please sign in to comment.