Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
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
edx
edx-platform
Commits
5effbf14
Commit
5effbf14
authored
Sep 16, 2015
by
Zia Fazal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scroll to top after saving
fixed broken bok choy tests
parent
d2659326
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
cms/static/js/certificates/spec/views/certificate_details_spec.js
+6
-0
cms/static/js/certificates/views/certificate_details.js
+7
-2
common/test/acceptance/pages/studio/settings_certificates.py
+2
-0
No files found.
cms/static/js/certificates/spec/views/certificate_details_spec.js
View file @
5effbf14
...
...
@@ -174,6 +174,12 @@ function(_, Course, CertificatesCollection, CertificateModel, CertificateDetails
this
.
view
.
$
(
'.action-delete .delete'
).
click
();
});
it
(
'should scroll to top after rendering if necessary'
,
function
()
{
$
.
smoothScroll
=
jasmine
.
createSpy
(
'jQuery.smoothScroll'
);
appendSetFixtures
(
this
.
view
.
render
().
el
);
expect
(
$
.
smoothScroll
).
toHaveBeenCalled
();
});
});
describe
(
'Signatory details'
,
function
(){
...
...
cms/static/js/certificates/views/certificate_details.js
View file @
5effbf14
...
...
@@ -8,7 +8,8 @@ define([ // jshint ignore:line
'js/views/baseview'
,
'js/certificates/models/signatory'
,
'js/certificates/views/signatory_details'
,
'common/js/components/utils/view_utils'
'common/js/components/utils/view_utils'
,
'jquery.smoothScroll'
],
function
(
$
,
_
,
str
,
gettext
,
BaseView
,
SignatoryModel
,
SignatoryDetailsView
,
ViewUtils
)
{
'use strict'
;
...
...
@@ -72,7 +73,11 @@ function($, _, str, gettext, BaseView, SignatoryModel, SignatoryDetailsView, Vie
if
(
this
.
model
.
collection
.
length
>
0
&&
window
.
certWebPreview
)
{
window
.
certWebPreview
.
show
();
}
$
.
smoothScroll
({
offset
:
0
,
easing
:
'swing'
,
speed
:
1000
});
return
this
;
}
});
...
...
common/test/acceptance/pages/studio/settings_certificates.py
View file @
5effbf14
...
...
@@ -11,6 +11,7 @@ The methods in these classes are organized into several conceptual buckets:
import
os
from
bok_choy.promise
import
EmptyPromise
from
...tests.helpers
import
disable_animations
from
.course_page
import
CoursePage
...
...
@@ -284,6 +285,7 @@ class Certificate(object):
"""
Create a new certificate.
"""
disable_animations
(
self
.
page
)
self
.
find_css
(
'.action-primary'
)
.
first
.
click
()
self
.
page
.
wait_for_ajax
()
...
...
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