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
ffa49b03
Commit
ffa49b03
authored
Sep 23, 2013
by
jmclaus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests
parent
9836fd51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js
+22
-0
No files found.
common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js
View file @
ffa49b03
...
@@ -138,6 +138,28 @@
...
@@ -138,6 +138,28 @@
expect
(
videoSpeedControl
.
currentSpeed
).
toEqual
(
0.75
);
expect
(
videoSpeedControl
.
currentSpeed
).
toEqual
(
0.75
);
});
});
});
});
describe
(
'make sure the speed control gets the focus afterwards'
,
function
()
{
var
focusSpy
;
beforeEach
(
function
()
{
initialize
();
videoSpeedControl
.
setSpeed
(
1.0
);
focusSpy
=
spyOn
(
$
.
fn
,
'focus'
).
andCallThrough
();
});
it
(
'when the speed is the same'
,
function
()
{
$
(
'li[data-speed="1.0"] a'
).
click
();
expect
(
focusSpy
).
toHaveBeenCalled
();
expect
(
focusSpy
.
mostRecentCall
.
object
.
selector
).
toEqual
(
'.parent().parent().siblings(a)'
);
});
it
(
'when the speed is not the same'
,
function
()
{
$
(
'li[data-speed="0.75"] a'
).
click
();
expect
(
focusSpy
).
toHaveBeenCalled
();
expect
(
focusSpy
.
mostRecentCall
.
object
.
selector
).
toEqual
(
'.parent().parent().siblings(a)'
);
});
});
});
});
describe
(
'onSpeedChange'
,
function
()
{
describe
(
'onSpeedChange'
,
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