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
14a9796c
Commit
14a9796c
authored
Jul 08, 2015
by
Andy Armstrong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-enable the video translation Jasmine tests
TNL-2689
parent
9e5290c1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
cms/static/coffee/spec/main_spec.coffee
+3
-3
cms/static/coffee/spec/models/section_spec.coffee
+2
-2
cms/static/js/spec/video/transcripts/videolist_spec.js
+0
-0
common/static/common/js/spec_helpers/ajax_helpers.js
+2
-2
No files found.
cms/static/coffee/spec/main_spec.coffee
View file @
14a9796c
...
...
@@ -28,7 +28,7 @@ require ["jquery", "backbone", "coffee/src/main", "common/js/spec_helpers/ajax_h
appendSetFixtures
(
sandbox
({
id
:
"page-notification"
}))
it
"successful AJAX request does not pop an error notification"
,
->
server
=
AjaxHelpers
[
'server'
](
200
,
this
)
server
=
AjaxHelpers
.
server
(
this
,
[
200
,
{},
''
]
)
expect
(
$
(
"#page-notification"
)).
toBeEmpty
()
$
.
ajax
(
"/test"
)
...
...
@@ -37,7 +37,7 @@ require ["jquery", "backbone", "coffee/src/main", "common/js/spec_helpers/ajax_h
expect
(
$
(
"#page-notification"
)).
toBeEmpty
()
it
"AJAX request with error should pop an error notification"
,
->
server
=
AjaxHelpers
[
'server'
](
500
,
this
)
server
=
AjaxHelpers
.
server
(
this
,
[
500
,
{},
''
]
)
$
.
ajax
(
"/test"
)
server
.
respond
()
...
...
@@ -45,7 +45,7 @@ require ["jquery", "backbone", "coffee/src/main", "common/js/spec_helpers/ajax_h
expect
(
$
(
"#page-notification"
)).
toContain
(
'div.wrapper-notification-error'
)
it
"can override AJAX request with error so it does not pop an error notification"
,
->
server
=
AjaxHelpers
[
'server'
](
500
,
this
)
server
=
AjaxHelpers
.
server
(
this
,
[
500
,
{},
''
]
)
$
.
ajax
url
:
"/test"
...
...
cms/static/coffee/spec/models/section_spec.coffee
View file @
14a9796c
...
...
@@ -34,7 +34,7 @@ define ["js/models/section", "common/js/spec_helpers/ajax_helpers", "js/utils/mo
})
it
"show/hide a notification when it saves to the server"
,
->
server
=
AjaxHelpers
[
'server'
](
200
,
this
)
server
=
AjaxHelpers
.
server
(
this
,
[
200
,
{},
''
]
)
@
model
.
save
()
expect
(
Section
.
prototype
.
showNotification
).
toHaveBeenCalled
()
...
...
@@ -43,7 +43,7 @@ define ["js/models/section", "common/js/spec_helpers/ajax_helpers", "js/utils/mo
it
"don't hide notification when saving fails"
,
->
# this is handled by the global AJAX error handler
server
=
AjaxHelpers
[
'server'
](
500
,
this
)
server
=
AjaxHelpers
.
server
(
this
,
[
500
,
{},
''
]
)
@
model
.
save
()
server
.
respond
()
...
...
cms/static/js/spec/video/transcripts/videolist_spec.js
View file @
14a9796c
This diff is collapsed.
Click to expand it.
common/static/common/js/spec_helpers/ajax_helpers.js
View file @
14a9796c
...
...
@@ -18,12 +18,12 @@ define(['sinon', 'underscore'], function(sinon, _) {
* Get a reference to the mocked server, and respond
* to all requests with the specified statusCode.
*/
fakeServer
=
function
(
statusCode
,
that
)
{
fakeServer
=
function
(
that
,
response
)
{
var
server
=
sinon
.
fakeServer
.
create
();
that
.
after
(
function
()
{
server
.
restore
();
});
server
.
respondWith
(
[
statusCode
,
{},
''
]
);
server
.
respondWith
(
response
);
return
server
;
};
...
...
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