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
68fb0230
Commit
68fb0230
authored
Oct 02, 2013
by
polesye
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1201 from edx/anton/fix_video_acceptance_tests
BLD-388: Fix acceptance tests.
parents
a3525875
9a4633be
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
12 deletions
+30
-12
cms/djangoapps/contentstore/features/upload.py
+3
-3
cms/djangoapps/contentstore/features/video-editor.py
+4
-0
cms/djangoapps/contentstore/features/video.py
+15
-7
common/lib/xmodule/xmodule/js/src/video/09_video_caption.js
+8
-2
common/test/data/uploads/subs_OEoXaMPEzfM.srt.sjson
+0
-0
No files found.
cms/djangoapps/contentstore/features/upload.py
View file @
68fb0230
...
@@ -10,7 +10,6 @@ import random
...
@@ -10,7 +10,6 @@ import random
import
os
import
os
from
django.contrib.auth.models
import
User
from
django.contrib.auth.models
import
User
from
student.models
import
CourseEnrollment
from
student.models
import
CourseEnrollment
from
splinter.request_handler.status_code
import
HttpResponseError
from
nose.tools
import
assert_equal
,
assert_not_equal
# pylint: disable=E0611
from
nose.tools
import
assert_equal
,
assert_not_equal
# pylint: disable=E0611
TEST_ROOT
=
settings
.
COMMON_TEST_DATA_ROOT
TEST_ROOT
=
settings
.
COMMON_TEST_DATA_ROOT
...
@@ -25,11 +24,12 @@ def go_to_uploads(_step):
...
@@ -25,11 +24,12 @@ def go_to_uploads(_step):
world
.
css_click
(
uploads_css
)
world
.
css_click
(
uploads_css
)
@step
(
u'I upload the file "([^"]*)"$'
)
@step
(
u'I upload the
( test?)
file "([^"]*)"$'
)
def
upload_file
(
_step
,
file_name
):
def
upload_file
(
_step
,
is_test_file
,
file_name
):
upload_css
=
'a.upload-button'
upload_css
=
'a.upload-button'
world
.
css_click
(
upload_css
)
world
.
css_click
(
upload_css
)
if
not
is_test_file
:
_write_test_file
(
file_name
,
"test file"
)
_write_test_file
(
file_name
,
"test file"
)
# uploading the file itself
# uploading the file itself
...
...
cms/djangoapps/contentstore/features/video-editor.py
View file @
68fb0230
...
@@ -23,6 +23,10 @@ def shows_captions(_step, show_captions):
...
@@ -23,6 +23,10 @@ def shows_captions(_step, show_captions):
else
:
else
:
assert
world
.
is_css_not_present
(
'div.video.closed'
)
assert
world
.
is_css_not_present
(
'div.video.closed'
)
# Prevent cookies from overriding course settings
world
.
browser
.
cookies
.
delete
(
'hide_captions'
)
world
.
browser
.
cookies
.
delete
(
'current_player_mode'
)
@step
(
'I see the correct video settings and default values$'
)
@step
(
'I see the correct video settings and default values$'
)
def
correct_video_settings
(
_step
):
def
correct_video_settings
(
_step
):
...
...
cms/djangoapps/contentstore/features/video.py
View file @
68fb0230
...
@@ -17,23 +17,31 @@ def i_created_a_video_component(step):
...
@@ -17,23 +17,31 @@ def i_created_a_video_component(step):
@step
(
'I have created a Video component with subtitles$'
)
@step
(
'I have created a Video component with subtitles$'
)
def
i_created_a_video_component_subtitles
(
step
):
def
i_created_a_video_with_subs
(
_step
):
step
.
given
(
'I have created a Video component'
)
_step
.
given
(
'I have created a Video component with subtitles "OEoXaMPEzfM"'
)
@step
(
'I have created a Video component with subtitles "([^"]*)"$'
)
def
i_created_a_video_with_subs_with_name
(
_step
,
sub_id
):
_step
.
given
(
'I have created a Video component'
)
# Store the current URL so we can return here
# Store the current URL so we can return here
video_url
=
world
.
browser
.
url
video_url
=
world
.
browser
.
url
# Upload subtitles for the video using the upload interface
# Upload subtitles for the video using the upload interface
step
.
given
(
'I have uploaded subtitles'
)
_step
.
given
(
'I have uploaded subtitles "{}"'
.
format
(
sub_id
)
)
# Return to the video
# Return to the video
world
.
visit
(
video_url
)
world
.
visit
(
video_url
)
@step
(
'I have uploaded subtitles'
)
@step
(
'I have uploaded subtitles "([^"]*)"$'
)
def
i_have_uploaded_subtitles
(
step
):
def
i_have_uploaded_subtitles
(
_step
,
sub_id
):
step
.
given
(
'I go to the files and uploads page'
)
_step
.
given
(
'I go to the files and uploads page'
)
step
.
given
(
'I upload the file "subs_OEoXaMPEzfM.srt.sjson"'
)
sub_id
=
sub_id
.
strip
()
if
not
sub_id
:
sub_id
=
'OEoXaMPEzfM'
_step
.
given
(
'I upload the test file "subs_{}.srt.sjson"'
.
format
(
sub_id
))
@step
(
'when I view the (.*) it does not have autoplay enabled$'
)
@step
(
'when I view the (.*) it does not have autoplay enabled$'
)
...
...
common/lib/xmodule/xmodule/js/src/video/09_video_caption.js
View file @
68fb0230
...
@@ -200,7 +200,7 @@ function () {
...
@@ -200,7 +200,7 @@ function () {
'STATUS:'
,
textStatus
+
', MESSAGE:'
,
''
+
errorThrown
'STATUS:'
,
textStatus
+
', MESSAGE:'
,
''
+
errorThrown
);
);
_this
.
videoCaption
.
hideCaptions
(
true
);
_this
.
videoCaption
.
hideCaptions
(
true
,
false
);
_this
.
videoCaption
.
hideSubtitlesEl
.
hide
();
_this
.
videoCaption
.
hideSubtitlesEl
.
hide
();
}
}
});
});
...
@@ -582,9 +582,13 @@ function () {
...
@@ -582,9 +582,13 @@ function () {
}
}
}
}
function
hideCaptions
(
hide_captions
)
{
function
hideCaptions
(
hide_captions
,
update_cookie
)
{
var
type
;
var
type
;
if
(
typeof
update_cookie
===
'undefined'
)
{
update_cookie
=
true
;
}
if
(
hide_captions
)
{
if
(
hide_captions
)
{
type
=
'hide_transcript'
;
type
=
'hide_transcript'
;
this
.
captionsHidden
=
true
;
this
.
captionsHidden
=
true
;
...
@@ -606,11 +610,13 @@ function () {
...
@@ -606,11 +610,13 @@ function () {
this
.
videoCaption
.
setSubtitlesHeight
();
this
.
videoCaption
.
setSubtitlesHeight
();
if
(
update_cookie
)
{
$
.
cookie
(
'hide_captions'
,
hide_captions
,
{
$
.
cookie
(
'hide_captions'
,
hide_captions
,
{
expires
:
3650
,
expires
:
3650
,
path
:
'/'
path
:
'/'
});
});
}
}
}
function
captionHeight
()
{
function
captionHeight
()
{
if
(
this
.
isFullScreen
)
{
if
(
this
.
isFullScreen
)
{
...
...
common/test/data/uploads/subs_OEoXaMPEzfM.srt.sjson
View file @
68fb0230
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