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
feb95eb8
Commit
feb95eb8
authored
Sep 24, 2013
by
jmclaus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tests
parent
2cc9679e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js
+4
-6
common/lib/xmodule/xmodule/js/src/video/08_video_speed_control.js
+2
-0
No files found.
common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js
View file @
feb95eb8
...
@@ -140,22 +140,20 @@
...
@@ -140,22 +140,20 @@
});
});
describe
(
'make sure the speed control gets the focus afterwards'
,
function
()
{
describe
(
'make sure the speed control gets the focus afterwards'
,
function
()
{
var
spyEvent
;
beforeEach
(
function
()
{
beforeEach
(
function
()
{
initialize
();
initialize
();
videoSpeedControl
.
setSpeed
(
1.0
);
videoSpeedControl
.
setSpeed
(
1.0
);
spy
Event
=
spyOnEvent
(
'.speeds > a'
,
'focus'
);
spy
OnEvent
(
state
.
videoSpeedControl
.
mainAnchor
,
'focus'
);
});
});
it
(
'when the speed is the same'
,
function
()
{
it
(
'when the speed is the same'
,
function
()
{
$
(
'li[data-speed="1.0"] a'
).
click
();
$
(
'li[data-speed="1.0"] a'
).
click
();
expect
(
spyEvent
).
toHaveBeenTriggered
(
);
expect
(
'focus'
).
toHaveBeenTriggeredOn
(
state
.
videoSpeedControl
.
mainAnchor
);
});
});
it
(
'when the speed is not the same'
,
function
()
{
it
(
'when the speed is not the same'
,
function
()
{
$
(
'li[data-speed="0.75"] a'
).
click
();
$
(
'li[data-speed="0.75"] a'
).
click
();
expect
(
spyEvent
).
toHaveBeenTriggered
();
;
expect
(
'focus'
).
toHaveBeenTriggeredOn
(
state
.
videoSpeedControl
.
mainAnchor
)
;
});
});
});
});
});
});
...
...
common/lib/xmodule/xmodule/js/src/video/08_video_speed_control.js
View file @
feb95eb8
...
@@ -62,6 +62,8 @@ function () {
...
@@ -62,6 +62,8 @@ function () {
state
.
videoSpeedControl
.
el
=
state
.
el
.
find
(
'div.speeds'
);
state
.
videoSpeedControl
.
el
=
state
.
el
.
find
(
'div.speeds'
);
state
.
videoSpeedControl
.
mainAnchor
=
state
.
videoSpeedControl
.
el
.
children
(
'a'
);
state
.
videoSpeedControl
.
videoSpeedsEl
=
state
.
videoSpeedControl
.
el
state
.
videoSpeedControl
.
videoSpeedsEl
=
state
.
videoSpeedControl
.
el
.
find
(
'.video_speeds'
);
.
find
(
'.video_speeds'
);
...
...
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