Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
a2ad0017
Commit
a2ad0017
authored
Aug 08, 2014
by
Aron Carroll
Committed by
Randall Leeds
Aug 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide the account management sheet on load
parent
7bb363b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
account-management.coffee
h/static/scripts/controllers/account-management.coffee
+3
-0
account-management-test.coffee
tests/js/controllers/account-management-test.coffee
+15
-0
No files found.
h/static/scripts/controllers/account-management.coffee
View file @
a2ad0017
...
...
@@ -32,6 +32,9 @@ class AccountManagement
$scope
.
changePassword
=
{}
$scope
.
deleteAccount
=
{}
# Initial form state.
$scope
.
sheet
=
false
$scope
.
delete
=
(
form
)
->
# If the password is correct, the account is deleted.
# The extension is then removed from the page.
...
...
tests/js/controllers/account-management-test.coffee
View file @
a2ad0017
...
...
@@ -43,6 +43,21 @@ describe 'h.controllers.AccountManagement', ->
createController
=
->
$controller
(
'AccountManagement'
,
{
$scope
:
$scope
})
it
'hides the sheet by default'
,
->
controller
=
createController
()
assert
.
isFalse
(
$scope
.
sheet
)
describe
'event subscriptions'
,
->
it
'should show the sheet on "nav:account" event'
,
->
controller
=
createController
()
$scope
.
$emit
(
'nav:account'
)
assert
.
isTrue
(
$scope
.
sheet
)
it
'should hide the sheet on "logout" event'
,
->
controller
=
createController
()
$scope
.
$emit
(
'logout'
)
assert
.
isFalse
(
$scope
.
sheet
)
describe
'.submit'
,
->
createFakeForm
=
(
overrides
=
{})
->
defaults
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment