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
8ffd1636
Commit
8ffd1636
authored
Sep 05, 2013
by
Valera Rozuvan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for test.
Must clear the state youtubeXhr variable before counting number of ajax calls.
parent
545af7e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
common/lib/xmodule/xmodule/js/spec/video/general_spec.js
+10
-5
No files found.
common/lib/xmodule/xmodule/js/spec/video/general_spec.js
View file @
8ffd1636
...
@@ -188,15 +188,20 @@
...
@@ -188,15 +188,20 @@
describe
(
'multiple YT on page'
,
function
()
{
describe
(
'multiple YT on page'
,
function
()
{
beforeEach
(
function
()
{
beforeEach
(
function
()
{
$
.
ajax
.
calls
.
length
=
0
;
$
.
ajaxWithPrefix
.
calls
=
0
;
loadFixtures
(
'video_yt_multiple.html'
);
loadFixtures
(
'video_yt_multiple.html'
);
state1
=
new
Video
(
'#example1'
);
spyOn
(
$
,
'ajaxWithPrefix'
);
spyOn
(
$
,
'ajaxWithPrefix'
);
$
.
ajax
.
calls
.
length
=
0
;
$
.
ajaxWithPrefix
.
calls
.
length
=
0
;
// Because several other tests have run, the variable
// that stores the value of the first ajax request must be
// cleared so that we test a pristine state of the video
// module.
Video
.
clearYoutubeXhr
();
state1
=
new
Video
(
'#example1'
);
state2
=
new
Video
(
'#example2'
);
state2
=
new
Video
(
'#example2'
);
state3
=
new
Video
(
'#example3'
);
state3
=
new
Video
(
'#example3'
);
});
});
...
...
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