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
f9738b92
Commit
f9738b92
authored
Feb 17, 2015
by
polesye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TNL-439: Fix flaky jasmine tests.
parent
2ff863cb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
118 deletions
+60
-118
common/lib/xmodule/xmodule/js/spec/video/video_context_menu_spec.js
+13
-26
common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
+47
-92
No files found.
common/lib/xmodule/xmodule/js/spec/video/video_context_menu_spec.js
View file @
f9738b92
...
...
@@ -217,44 +217,31 @@
expect
(
menuSubmenuItem
).
not
.
toHaveClass
(
'is-opened'
);
});
// Flaky-test resulting in timeout errors. Disabled 09/18/2014
// See TNL-439
xit
(
'mouse left/right-clicking behaves as expected on play/pause menu item'
,
function
()
{
it
(
'mouse left/right-clicking behaves as expected on play/pause menu item'
,
function
()
{
var
menuItem
=
menuItems
.
first
();
runs
(
function
()
{
spyOn
(
state
.
videoPlayer
,
'play'
).
andCallFake
(
function
()
{
state
.
videoControl
.
isPlaying
=
true
;
state
.
el
.
trigger
(
'play'
);
});
spyOn
(
state
.
videoPlayer
,
'pause'
).
andCallFake
(
function
()
{
state
.
videoControl
.
isPlaying
=
false
;
state
.
el
.
trigger
(
'pause'
);
});
// Left-click on play
menuItem
.
click
();
});
waitsFor
(
function
()
{
return
state
.
videoPlayer
.
isPlaying
();
},
'video to start playing'
,
200
);
runs
(
function
()
{
expect
(
state
.
videoPlayer
.
play
).
toHaveBeenCalled
();
expect
(
menuItem
).
toHaveText
(
'Pause'
);
openMenu
();
// Left-click on pause
menuItem
.
click
();
});
waitsFor
(
function
()
{
return
!
state
.
videoPlayer
.
isPlaying
();
},
'video to start playing'
,
200
);
runs
(
function
()
{
expect
(
state
.
videoPlayer
.
pause
).
toHaveBeenCalled
();
expect
(
menuItem
).
toHaveText
(
'Play'
);
state
.
videoPlayer
.
play
.
reset
();
// Right-click on play
menuItem
.
trigger
(
'contextmenu'
);
});
waitsFor
(
function
()
{
return
state
.
videoPlayer
.
isPlaying
();
},
'video to start playing'
,
200
);
runs
(
function
()
{
expect
(
state
.
videoPlayer
.
play
).
toHaveBeenCalled
();
expect
(
menuItem
).
toHaveText
(
'Pause'
);
});
});
it
(
'mouse left/right-clicking behaves as expected on mute/unmute menu item'
,
function
()
{
var
menuItem
=
menuItems
.
eq
(
1
);
...
...
common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
View file @
f9738b92
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