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
2d64a277
Commit
2d64a277
authored
May 12, 2014
by
polesye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix acceptance tests.
parent
83988724
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
56 additions
and
45 deletions
+56
-45
cms/djangoapps/contentstore/features/transcripts.feature
+0
-0
cms/djangoapps/contentstore/features/transcripts.py
+10
-7
cms/djangoapps/contentstore/features/video.feature
+8
-8
cms/djangoapps/contentstore/features/video_editor.feature
+1
-1
cms/djangoapps/contentstore/features/video_editor.py
+27
-19
cms/templates/js/video/transcripts/messages/transcripts-not-found.underscore
+2
-2
cms/templates/js/video/transcripts/messages/transcripts-uploaded.underscore
+2
-2
cms/templates/js/video/transcripts/messages/transcripts-use-existing.underscore
+6
-6
No files found.
cms/djangoapps/contentstore/features/transcripts.feature
View file @
2d64a277
This diff is collapsed.
Click to expand it.
cms/djangoapps/contentstore/features/transcripts.py
View file @
2d64a277
...
...
@@ -17,12 +17,13 @@ TEST_ROOT = settings.COMMON_TEST_DATA_ROOT
DELAY
=
0.5
ERROR_MESSAGES
=
{
'url_format'
:
u'Incorrect
URL
format.'
,
'file_type'
:
u'
Video file types must
be unique.'
,
'url_format'
:
u'Incorrect
url
format.'
,
'file_type'
:
u'
Link types should
be unique.'
,
}
STATUSES
=
{
'found'
:
u'Timed Transcript Found'
,
'not found on edx'
:
u'No EdX Timed Transcript'
,
'not found'
:
u'No Timed Transcript'
,
'replace'
:
u'Timed Transcript Conflict'
,
'uploaded_successfully'
:
u'Timed Transcript Uploaded Successfully'
,
...
...
@@ -42,10 +43,10 @@ TRANSCRIPTS_BUTTONS = {
'import'
:
(
'.setting-import'
,
'Import YouTube Transcript'
),
'download_to_edit'
:
(
'.setting-download'
,
'Download Transcript for Editing'
),
'disabled_download_to_edit'
:
(
'.setting-download.is-disabled'
,
'Download Transcript for Editing'
),
'upload_new_timed_transcripts'
:
(
'.setting-upload'
,
'Upload New T
imed T
ranscript'
),
'upload_new_timed_transcripts'
:
(
'.setting-upload'
,
'Upload New Transcript'
),
'replace'
:
(
'.setting-replace'
,
'Yes, replace the edX transcript with the YouTube transcript'
),
'choose'
:
(
'.setting-choose'
,
'Timed Transcript from {}'
),
'use_existing'
:
(
'.setting-use-existing'
,
'Use
Existing Timed
Transcript'
),
'use_existing'
:
(
'.setting-use-existing'
,
'Use
Current
Transcript'
),
}
...
...
@@ -210,7 +211,8 @@ def check_text_in_the_captions(_step, text):
@step
(
'I see value "([^"]*)" in the field "([^"]*)"$'
)
def
check_transcripts_field
(
_step
,
values
,
field_name
):
world
.
select_editor_tab
(
'Advanced'
)
field_id
=
'#'
+
world
.
browser
.
find_by_xpath
(
'//label[text()="
%
s"]'
%
field_name
.
strip
())[
0
][
'for'
]
tab
=
world
.
css_find
(
'#settings-tab'
)
.
first
;
field_id
=
'#'
+
tab
.
find_by_xpath
(
'.//label[text()="
%
s"]'
%
field_name
.
strip
())[
0
][
'for'
]
values_list
=
[
i
.
strip
()
==
world
.
css_value
(
field_id
)
for
i
in
values
.
split
(
'|'
)]
assert
any
(
values_list
)
world
.
select_editor_tab
(
'Basic'
)
...
...
@@ -228,8 +230,9 @@ def open_tab(_step, tab_name):
@step
(
'I set value "([^"]*)" to the field "([^"]*)"$'
)
def
set_value_transcripts_field
(
_step
,
value
,
field_name
):
XPATH
=
'//label[text()="{name}"]'
.
format
(
name
=
field_name
)
SELECTOR
=
'#'
+
world
.
browser
.
find_by_xpath
(
XPATH
)[
0
][
'for'
]
tab
=
world
.
css_find
(
'#settings-tab'
)
.
first
;
XPATH
=
'.//label[text()="{name}"]'
.
format
(
name
=
field_name
)
SELECTOR
=
'#'
+
tab
.
find_by_xpath
(
XPATH
)[
0
][
'for'
]
element
=
world
.
css_find
(
SELECTOR
)
.
first
if
element
[
'type'
]
==
'text'
:
SCRIPT
=
'$("{selector}").val("{value}").change()'
.
format
(
...
...
cms/djangoapps/contentstore/features/video.feature
View file @
2d64a277
...
...
@@ -72,8 +72,8 @@ Feature: CMS Video Component
And
Make sure captions are closed
And
I edit the component
And
I open tab
"Advanced"
And I set value "00
:
00
:
12"
to
the
field
"Start
Time"
And I set value "00
:
00
:
24"
to
the
field
"
End
Time"
And I set value "00
:
00
:
12"
to
the
field
"
Video
Start
Time"
And I set value "00
:
00
:
24"
to
the
field
"
Video
Stop
Time"
And
I save changes
And
I click video button
"play"
Then
I see a range on slider
...
...
@@ -85,8 +85,8 @@ Feature: CMS Video Component
# And Make sure captions are closed
# And I edit the component
# And I open tab "Advanced"
# And I set value "00:00:12" to the field "Start Time"
# And I set value "00:00:24" to the field "
End
Time"
# And I set value "00:00:12" to the field "
Video
Start Time"
# And I set value "00:00:24" to the field "
Video Stop
Time"
# And I save changes
# And I click video button "play"
# Then I see a range on slider
...
...
@@ -103,8 +103,8 @@ Feature: CMS Video Component
# And Make sure captions are closed
# And I edit the component
# And I open tab "Advanced"
# And I set value "00:00:12" to the field "Start Time"
# And I set value "00:00:24" to the field "
End
Time"
# And I set value "00:00:12" to the field "
Video
Start Time"
# And I set value "00:00:24" to the field "
Video Stop
Time"
# And I save changes
# And I click video button "play"
# Then I see a range on slider
...
...
@@ -121,8 +121,8 @@ Feature: CMS Video Component
# And Make sure captions are closed
# And I edit the component
# And I open tab "Advanced"
# And I set value "00:00:12" to the field "Start Time"
# And I set value "00:00:24" to the field "
End
Time"
# And I set value "00:00:12" to the field "
Video
Start Time"
# And I set value "00:00:24" to the field "
Video Stop
Time"
# And I save changes
# And I click video button "play"
# Then I see a range on slider
...
...
cms/djangoapps/contentstore/features/video_editor.feature
View file @
2d64a277
...
...
@@ -15,7 +15,7 @@ Feature: CMS Video Component Editor
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
Then
I can modify
the
display name
Then
I can modify
video
display name
And
my video display name change is persisted on save
# 3
...
...
cms/djangoapps/contentstore/features/video_editor.py
View file @
2d64a277
...
...
@@ -11,6 +11,7 @@ from common import upload_file, attach_file
TEST_ROOT
=
settings
.
COMMON_TEST_DATA_ROOT
DISPLAY_NAME
=
"Component Display Name"
NATIVE_LANGUAGES
=
{
lang
:
label
for
lang
,
label
in
settings
.
LANGUAGES
if
len
(
lang
)
==
2
}
LANGUAGES
=
{
lang
:
NATIVE_LANGUAGES
.
get
(
lang
,
display
)
...
...
@@ -76,7 +77,7 @@ def success_upload_file(filename):
def
get_translations_container
():
return
world
.
browser
.
find_by_xpath
(
'//label[text()="Transcript
Translation
s"]/following-sibling::div'
)
return
world
.
browser
.
find_by_xpath
(
'//label[text()="Transcript
Language
s"]/following-sibling::div'
)
def
get_setting_container
(
lang_code
):
...
...
@@ -114,7 +115,7 @@ def set_show_captions(step, setting):
world
.
edit_component
()
world
.
select_editor_tab
(
'Advanced'
)
world
.
browser
.
select
(
'
Transcript Display
'
,
setting
)
world
.
browser
.
select
(
'
Show Transcript
'
,
setting
)
world
.
save_component
()
...
...
@@ -136,25 +137,25 @@ def shows_captions(_step, show_captions):
def
correct_video_settings
(
_step
):
expected_entries
=
[
# basic
[
'Display Name'
,
'Video'
,
False
],
[
'Video URL'
,
'http://youtu.be/OEoXaMPEzfM, , '
,
False
],
[
DISPLAY_NAME
,
'Video'
,
False
],
[
'
Default
Video URL'
,
'http://youtu.be/OEoXaMPEzfM, , '
,
False
],
# advanced
[
'Display Name'
,
'Video'
,
False
],
[
'Download Transcript'
,
''
,
False
],
[
'End Time'
,
'00:00:00'
,
False
],
[
'Start Time'
,
'00:00:00'
,
False
],
[
'Transcript (primary)'
,
''
,
False
],
[
'Transcript Display'
,
'True'
,
False
],
[
'Transcript Download Allowed'
,
'False'
,
False
],
[
'Transcript Translations'
,
''
,
False
],
[
DISPLAY_NAME
,
'Video'
,
False
],
[
'Default Timed Transcript'
,
''
,
False
],
[
'Download Transcript Allowed'
,
'False'
,
False
],
[
'Downloadable Transcript URL'
,
''
,
False
],
[
'Show Transcript'
,
'True'
,
False
],
[
'Transcript Languages'
,
''
,
False
],
[
'Upload Handout'
,
''
,
False
],
[
'Video Download Allowed'
,
'False'
,
False
],
[
'Video Sources'
,
''
,
False
],
[
'Youtube ID'
,
'OEoXaMPEzfM'
,
False
],
[
'Youtube ID for .75x speed'
,
''
,
False
],
[
'Youtube ID for 1.25x speed'
,
''
,
False
],
[
'Youtube ID for 1.5x speed'
,
''
,
False
]
[
'Video File URLs'
,
''
,
False
],
[
'Video Start Time'
,
'00:00:00'
,
False
],
[
'Video Stop Time'
,
'00:00:00'
,
False
],
[
'YouTube ID'
,
'OEoXaMPEzfM'
,
False
],
[
'YouTube ID for .75x speed'
,
''
,
False
],
[
'YouTube ID for 1.25x speed'
,
''
,
False
],
[
'YouTube ID for 1.5x speed'
,
''
,
False
]
]
world
.
verify_all_setting_entries
(
expected_entries
)
...
...
@@ -167,11 +168,18 @@ def video_name_persisted(step):
world
.
edit_component
()
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
'Display Name'
),
'Display Name'
,
'3.4'
,
True
world
.
get_setting_entry
(
DISPLAY_NAME
),
DISPLAY_NAME
,
'3.4'
,
True
)
@step
(
'I can modify video display name'
)
def
i_can_modify_video_display_name
(
_step
):
index
=
world
.
get_setting_entry_index
(
DISPLAY_NAME
)
world
.
set_field_value
(
index
,
'3.4'
)
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
DISPLAY_NAME
),
DISPLAY_NAME
,
'3.4'
,
True
)
@step
(
'I upload transcript file(?:s)?:$'
)
def
upload_transcript
(
step
):
input_hidden
=
'.metadata-video-translations .input'
...
...
cms/templates/js/video/transcripts/messages/transcripts-not-found.underscore
View file @
2d64a277
...
...
@@ -7,8 +7,8 @@
<%= gettext("Error.") %>
</p>
<div class="wrapper-transcripts-buttons">
<button class="action setting-upload" type="button" name="setting-upload" value="<%= gettext("Upload New T
imed Transcript") %>" data-tooltip="<%= gettext("Upload New Timed
Transcript") %>">
<%= gettext("Upload New T
imed T
ranscript") %>
<button class="action setting-upload" type="button" name="setting-upload" value="<%= gettext("Upload New T
ranscript") %>" data-tooltip="<%= gettext("Upload New
Transcript") %>">
<%= gettext("Upload New Transcript") %>
</button>
<a class="action setting-download is-disabled" href="javascropt: void(0);" data-tooltip="<%= gettext("Download Transcript for Editing") %>">
<%= gettext("Download Transcript for Editing") %>
...
...
cms/templates/js/video/transcripts/messages/transcripts-uploaded.underscore
View file @
2d64a277
...
...
@@ -7,8 +7,8 @@
<%= gettext("Error.") %>
</p>
<div class="wrapper-transcripts-buttons">
<button class="action setting-upload" type="button" name="setting-upload" value="<%= gettext("Upload New T
imed Transcript") %>" data-tooltip="<%= gettext("Upload New Timed
Transcript") %>">
<span><%= gettext("Upload New T
imed T
ranscript") %></span>
<button class="action setting-upload" type="button" name="setting-upload" value="<%= gettext("Upload New T
ranscript") %>" data-tooltip="<%= gettext("Upload New
Transcript") %>">
<span><%= gettext("Upload New Transcript") %></span>
</button>
<a class="action setting-download" href="/transcripts/download?locator=<%= component_locator %>&subs_id=<%= subs_id %>" data-tooltip="<%= gettext("Download Transcript for Editing") %>">
<span><%= gettext("Download Transcript for Editing") %></span>
...
...
cms/templates/js/video/transcripts/messages/transcripts-use-existing.underscore
View file @
2d64a277
...
...
@@ -18,22 +18,22 @@
class="action setting-use-existing"
type="button"
name="setting-use-existing"
value="<%= gettext("Use Current T
imed T
ranscript") %>"
data-tooltip="<%= gettext("Use Current T
imed T
ranscript") %>"
value="<%= gettext("Use Current Transcript") %>"
data-tooltip="<%= gettext("Use Current Transcript") %>"
>
<span>
<%= gettext("Use Current T
imed T
ranscript") %>
<%= gettext("Use Current Transcript") %>
</span>
</button>
<button
class="action setting-upload"
type="button"
name="setting-upload"
value="<%= gettext("Upload New T
imed T
ranscript") %>"
data-tooltip="<%= gettext("Upload New T
imed T
ranscript") %>"
value="<%= gettext("Upload New Transcript") %>"
data-tooltip="<%= gettext("Upload New Transcript") %>"
>
<span>
<%= gettext("Upload New T
imed T
ranscript") %>
<%= gettext("Upload New Transcript") %>
</span>
</button>
</div>
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