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
3c9d86f7
Commit
3c9d86f7
authored
Oct 28, 2013
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add explicit wait to JS transcript tests
parent
5449a3cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
20 deletions
+32
-20
cms/static/js_spec/transcripts/editor_spec.js
+32
-20
No files found.
cms/static/js_spec/transcripts/editor_spec.js
View file @
3c9d86f7
...
...
@@ -168,15 +168,18 @@ function ($, Backbone, _, Utils, Editor, MetadataView, MetadataModel, MetadataCo
return
(
displayNameValue
!==
""
&&
displayNameValue
!=
"video_id"
);
},
"Defaults never loaded"
,
1000
);
var
displayNameValue
=
collection
[
0
].
getValue
();
var
videoUrlValue
=
collection
[
1
].
getValue
();
runs
(
function
()
{
expect
(
displayNameValue
).
toBe
(
'default'
);
expect
(
videoUrlValue
).
toEqual
([
'http://youtu.be/OEoXaMPEzfM'
,
'default.mp4'
,
'default.webm'
]);
var
displayNameValue
=
collection
[
0
].
getValue
();
var
videoUrlValue
=
collection
[
1
].
getValue
();
expect
(
displayNameValue
).
toBe
(
'default'
);
expect
(
videoUrlValue
).
toEqual
([
'http://youtu.be/OEoXaMPEzfM'
,
'default.mp4'
,
'default.webm'
]);
});
});
it
(
'If metadataCollection is not defined'
,
function
()
{
...
...
@@ -220,19 +223,28 @@ function ($, Backbone, _, Utils, Editor, MetadataView, MetadataModel, MetadataCo
it
(
'Correct data'
,
function
()
{
transcripts
.
syncAdvancedTab
(
metadataCollection
);
var
collection
=
metadataCollection
.
models
,
displayNameValue
=
collection
[
0
].
getValue
(),
subValue
=
collection
[
1
].
getValue
(),
html5SourcesValue
=
collection
[
2
].
getValue
(),
youtubeValue
=
collection
[
3
].
getValue
();
var
collection
=
metadataCollection
.
models
;
expect
(
displayNameValue
).
toBe
(
'display value'
);
expect
(
subValue
).
toBe
(
'default'
);
expect
(
html5SourcesValue
).
toEqual
([
'video.mp4'
,
'video.webm'
]);
expect
(
youtubeValue
).
toBe
(
'12345678901'
);
waitsFor
(
function
()
{
var
displayNameValue
=
collection
[
0
].
getValue
();
return
(
displayNameValue
!==
""
&&
displayNameValue
!=
"video_id"
);
},
"Defaults never loaded"
,
1000
);
runs
(
function
()
{
var
displayNameValue
=
collection
[
0
].
getValue
();
var
subValue
=
collection
[
1
].
getValue
();
var
html5SourcesValue
=
collection
[
2
].
getValue
();
var
youtubeValue
=
collection
[
3
].
getValue
();
expect
(
displayNameValue
).
toBe
(
'display value'
);
expect
(
subValue
).
toBe
(
'default'
);
expect
(
html5SourcesValue
).
toEqual
([
'video.mp4'
,
'video.webm'
]);
expect
(
youtubeValue
).
toBe
(
'12345678901'
);
});
});
it
(
'metadataCollection is not defined'
,
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