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
f9f9123c
Commit
f9f9123c
authored
Aug 08, 2013
by
Valera Rozuvan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unnecessary commented out code from Jasmine tests.
parent
4f207299
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
110 deletions
+6
-110
common/lib/xmodule/xmodule/js/spec/videoalpha/video_caption_spec.js
+0
-22
common/lib/xmodule/xmodule/js/spec/videoalpha/video_player_spec.js
+5
-52
common/lib/xmodule/xmodule/js/spec/videoalpha/video_progress_slider_spec.js
+0
-23
common/lib/xmodule/xmodule/js/spec/videoalpha/video_speed_control_spec.js
+1
-13
No files found.
common/lib/xmodule/xmodule/js/spec/videoalpha/video_caption_spec.js
View file @
f9f9123c
...
...
@@ -130,7 +130,6 @@
describe
(
'mouse movement'
,
function
()
{
beforeEach
(
function
()
{
//initialize();
window
.
setTimeout
.
andReturn
(
100
);
spyOn
(
window
,
'clearTimeout'
);
});
...
...
@@ -221,10 +220,6 @@
});
describe
(
'search'
,
function
()
{
beforeEach
(
function
()
{
//initialize();
});
it
(
'return a correct caption index'
,
function
()
{
expect
(
videoCaption
.
search
(
0
)).
toEqual
(
0
);
expect
(
videoCaption
.
search
(
3120
)).
toEqual
(
1
);
...
...
@@ -277,7 +272,6 @@
describe
(
'pause'
,
function
()
{
beforeEach
(
function
()
{
//initialize();
videoCaption
.
playing
=
true
;
videoCaption
.
pause
();
});
...
...
@@ -288,10 +282,6 @@
});
describe
(
'updatePlayTime'
,
function
()
{
/*beforeEach(function() {
initialize();
});*/
describe
(
'when the video speed is 1.0x'
,
function
()
{
beforeEach
(
function
()
{
videoSpeedControl
.
currentSpeed
=
'1.0'
;
...
...
@@ -439,17 +429,6 @@
});
it
(
'scroll to current caption'
,
function
()
{
// Check for calledWith(parameters) for some reason fails...
//
// var offset = -0.5 * ($('.video-wrapper').height() - $('.subtitles .current:first').height());
//
// expect($.fn.scrollTo).toHaveBeenCalledWith(
// $('.subtitles .current:first', videoCaption.el),
// {
// offset: offset
// }
// );
expect
(
$
.
fn
.
scrollTo
).
toHaveBeenCalled
();
});
});
...
...
@@ -459,7 +438,6 @@
describe
(
'seekPlayer'
,
function
()
{
describe
(
'when the video speed is 1.0x'
,
function
()
{
beforeEach
(
function
()
{
//initialize();
videoSpeedControl
.
currentSpeed
=
'1.0'
;
$
(
'.subtitles li[data-start="14910"]'
).
trigger
(
'click'
);
});
...
...
common/lib/xmodule/xmodule/js/spec/videoalpha/video_player_spec.js
View file @
f9f9123c
...
...
@@ -74,38 +74,6 @@
// All the toHandleWith() expect tests are not necessary for this version of Video Alpha.
// jQuery event system is not used to trigger and invoke methods. This is an artifact from
// previous version of Video Alpha.
//
// xit('bind to video control play event', function() {
// expect($(videoControl)).toHandleWith('play', player.play);
// });
//
// xit('bind to video control pause event', function() {
// expect($(videoControl)).toHandleWith('pause', player.pause);
// });
//
// xit('bind to video caption seek event', function() {
// expect($(videoCaption)).toHandleWith('caption_seek', player.onSeek);
// });
//
// xit('bind to video speed control speedChange event', function() {
// expect($(videoSpeedControl)).toHandleWith('speedChange', player.onSpeedChange);
// });
//
// xit('bind to video progress slider seek event', function() {
// expect($(videoProgressSlider)).toHandleWith('slide_seek', player.onSeek);
// });
//
// xit('bind to video volume control volumeChange event', function() {
// expect($(videoVolumeControl)).toHandleWith('volumeChange', player.onVolumeChange);
// });
//
// xit('bind to key press', function() {
// expect($(document.documentElement)).toHandleWith('keyup', player.bindExitFullScreen);
// });
//
// xit('bind to fullscreen switching button', function() {
// expect($('.add-fullscreen')).toHandleWith('click', player.toggleFullScreen);
// });
});
it
(
'create Youtube player'
,
function
()
{
...
...
@@ -143,20 +111,6 @@
// We can't test the invocation of HTML5Video because it is not available
// globally. It is defined within the scope of Require JS.
//
// xit('create HTML5 player', function() {
// spyOn(state.HTML5Video, 'Player').andCallThrough();
// initialize();
//
// expect(window.HTML5Video.Player).toHaveBeenCalledWith(this.video.el, {
// playerVars: playerVars,
// videoSources: this.video.html5Sources,
// events: {
// onReady: player.onReady,
// onStateChange: player.onStateChange
// }
// });
// });
describe
(
'when not on a touch based device'
,
function
()
{
beforeEach
(
function
()
{
...
...
@@ -419,11 +373,9 @@
expect
(
state
.
setSpeed
).
toHaveBeenCalledWith
(
'0.75'
,
false
);
});
// Not relevant any more
.
// Not relevant any more
:
//
// it('tell video caption that the speed has changed', function() {
// expect(this.player.caption.currentSpeed).toEqual('0.75');
// });
// expect( "tell video caption that the speed has changed" ) ...
});
describe
(
'when the video is playing'
,
function
()
{
...
...
@@ -534,8 +486,9 @@
expect
(
true
).
toBe
(
false
);
}
// The below test has been replaced by above trickery.
// expect($('.vidtime')).toHaveHtml('1:00 / 1:01');
// The below test has been replaced by above trickery:
//
// expect($('.vidtime')).toHaveHtml('1:00 / 1:01');
});
});
...
...
common/lib/xmodule/xmodule/js/spec/videoalpha/video_progress_slider_spec.js
View file @
f9f9123c
...
...
@@ -54,7 +54,6 @@
// We can't expect $.fn.slider not to have been called,
// because sliders are used in other parts of VideoAlpha.
// expect($.fn.slider).not.toHaveBeenCalled();
});
});
});
...
...
@@ -79,28 +78,6 @@
});
// Currently, the slider is not rebuilt if it does not exist.
//
// describe('when the slider was not already built', function() {
// beforeEach(function() {
// spyOn($.fn, 'slider').andCallThrough();
// videoProgressSlider.slider = null;
// videoPlayer.play();
// });
//
// it('build the slider', function() {
// expect(videoProgressSlider.slider).toBe('.slider');
// expect($.fn.slider).toHaveBeenCalledWith({
// range: 'min',
// change: videoProgressSlider.onChange,
// slide: videoProgressSlider.onSlide,
// stop: videoProgressSlider.onStop
// });
// });
//
// it('build the seek handle', function() {
// expect(videoProgressSlider.handle).toBe('.ui-slider-handle');
// });
// });
});
describe
(
'updatePlayTime'
,
function
()
{
...
...
common/lib/xmodule/xmodule/js/spec/videoalpha/video_speed_control_spec.js
View file @
f9f9123c
...
...
@@ -90,19 +90,7 @@
// detect (and do not do anything) if there is a request for a speed that
// is already set.
//
// describe('when new speed is the same', function() {
// beforeEach(function() {
// initialize();
// videoSpeedControl.setSpeed(1.0);
// spyOn(videoPlayer, 'onSpeedChange').andCallThrough();
//
// $('li[data-speed="1.0"] a').click();
// });
//
// it('does not trigger speedChange event', function() {
// expect(videoPlayer.onSpeedChange).not.toHaveBeenCalled();
// });
// });
// describe("when new speed is the same") ...
describe
(
'when new speed is not the same'
,
function
()
{
beforeEach
(
function
()
{
...
...
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