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
68dd78e9
Commit
68dd78e9
authored
Apr 15, 2014
by
Valera Rozuvan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing start-time and end-time related Jasmine tests.
BLD-1013
parent
c9b419d5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
9 deletions
+38
-9
.jshintrc
+26
-1
common/lib/xmodule/xmodule/js/spec/helper.js
+12
-8
common/lib/xmodule/xmodule/js/spec/video/video_control_spec.js
+0
-0
No files found.
.jshintrc
View file @
68dd78e9
...
...
@@ -108,5 +108,30 @@
//
// The parameter "predef" should remain empty for this configuration file
// to remain as general as possible.
"predef": []
"predef": [
// jQuery library.
"jQuery", "$",
// Underscore.js library.
"_",
// Jasmine library.
"jasmine",
"describe", "xdescribe",
"it", "xit",
"spyOn",
"beforeEach",
"afterEach",
"expect",
"waitsFor",
"runs",
// jQuery-Jasmine library.
"loadFixtures",
"appendLoadFixtures",
"readFixtures",
"setFixtures",
"appendSetFixtures",
"spyOnEvent"
]
}
common/lib/xmodule/xmodule/js/spec/helper.js
View file @
68dd78e9
(
function
(
$
,
undefined
)
{
(
function
()
{
'use strict'
;
var
stubbedYT
=
{
Player
:
function
()
{
var
Player
=
jasmine
.
createSpyObj
(
...
...
@@ -150,11 +152,11 @@
}
}
else
if
(
settings
.
url
.
match
(
/transcript
\/
translation
\/
.+$/
))
{
return
settings
.
success
(
jasmine
.
stubbedCaption
);
}
else
if
(
settings
.
url
==
'/transcript/available_translations'
)
{
}
else
if
(
settings
.
url
==
=
'/transcript/available_translations'
)
{
return
settings
.
success
([
'uk'
,
'de'
]);
}
else
if
(
settings
.
url
.
match
(
/.+
\/
problem_get$/
))
{
return
settings
.
success
({
html
:
readFixtures
(
'problem_content.html'
)
html
:
window
.
readFixtures
(
'problem_content.html'
)
});
}
else
if
(
settings
.
url
===
'/calculate'
||
...
...
@@ -163,13 +165,15 @@
settings
.
url
.
match
(
/.+
\/
problem_
(
check|reset|show|save
)
$/
)
)
{
// Do nothing.
}
else
if
(
settings
.
url
==
'/save_user_state'
)
{
return
;
}
else
if
(
settings
.
url
===
'/save_user_state'
)
{
return
{
success
:
true
};
}
else
if
(
settings
.
url
===
'http://www.youtube.com/iframe_api'
)
{
// Stub YouTube API.
window
.
YT
=
stubbedYT
;
// Call the callback that must be called when YouTube API is loaded. By specification.
// Call the callback that must be called when YouTube API is
// loaded. By specification.
window
.
onYouTubeIframeAPIReady
();
return
{
success
:
true
};
...
...
@@ -205,7 +209,7 @@
}
});
return
this
.
addMatchers
(
imagediff
.
jasmine
);
return
this
.
addMatchers
(
window
.
imagediff
.
jasmine
);
});
// Stub jQuery.cookie module.
...
...
@@ -244,7 +248,7 @@
}
jasmine
.
stubRequests
();
state
=
new
Video
(
'#example'
);
state
=
new
window
.
Video
(
'#example'
);
state
.
resizer
=
(
function
()
{
var
methods
=
[
...
...
@@ -279,4 +283,4 @@
// "video.html" contains HTML template for a YouTube video.
return
jasmine
.
initializePlayer
(
'video.html'
,
params
);
};
}).
call
(
this
,
window
.
jQuery
);
}).
call
(
this
);
common/lib/xmodule/xmodule/js/spec/video/video_control_spec.js
View file @
68dd78e9
This diff is collapsed.
Click to expand it.
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