This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cdc2a5b
commit d29a724
Showing
2 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,24 +20,32 @@ def test_pasting_a_package_json_works(self): | |
self.make_package(name='amperize', description='Amperize!') | ||
glob = self.make_package(name='glob', description='Glob!', emails=['[email protected]']) | ||
self.make_package(name='netjet', description='Netjet!', emails=['[email protected]']) | ||
scape = self.make_package(name='scape', description='Reject!', emails=['[email protected]']) | ||
self.claim_package(self.make_participant('alice'), 'amperize') | ||
self.claim_package(self.make_participant('bob'), 'glob') | ||
self.claim_package(self.make_participant('goat'), 'scape') | ||
|
||
admin = self.make_admin() | ||
glob.team.update(name='Glub') | ||
glob.team.update_review_status('approved', admin) | ||
scape.team.update_review_status('rejected', admin) | ||
|
||
self.sign_in('alice') | ||
self.visit('/on/npm/') | ||
self.css('textarea').fill('''\ | ||
{ "dependencies": { "glob": "..." , "amperize": "..."} | ||
{ "dependencies": { "glob": "..." , "amperize": "...", "scape": "..."} | ||
, "optionalDependencies": {"netjet": "...", "falafel": "..."} | ||
} | ||
''') | ||
self.css('form button').click() | ||
|
||
names = [x.text for x in self.css('.listing-name')] | ||
assert names == ['glob \u2192 Glub', 'amperize', 'netjet', 'falafel'] | ||
assert names == ['glob \u2192 Glub', 'amperize', 'scape', 'netjet', 'falafel'] | ||
|
||
statuses = [x.text[3:] for x in self.css('.listing-details .status')] | ||
assert statuses == ['Approved', 'Unreviewed', 'Rejected', 'Unclaimed'] | ||
|
||
enabled = [not x.has_class('disabled') for x in self.css('td.item')] | ||
assert enabled == [True, True, True, False] | ||
assert enabled == [True, True, True, True, False] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters