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
f93e4f27
Commit
f93e4f27
authored
Aug 11, 2014
by
Muhammad Ammar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bok-Choy CMS Video Editor Tests
parent
70d47fb5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
251 deletions
+15
-251
cms/djangoapps/contentstore/features/video_editor.feature
+0
-241
common/test/acceptance/pages/lms/video/video.py
+9
-6
common/test/acceptance/pages/studio/video/video.py
+0
-0
common/test/acceptance/tests/video/test_studio_video_editor.py
+0
-0
common/test/acceptance/tests/video/test_studio_video_module.py
+4
-3
common/test/acceptance/tests/video/test_video_module.py
+2
-1
No files found.
cms/djangoapps/contentstore/features/video_editor.feature
deleted
100644 → 0
View file @
70d47fb5
@shard_1
@requires_stub_youtube
Feature
:
CMS Video Component Editor
As a course author, I want to be able to create video components
# 1
Scenario
:
User can view Video metadata
Given
I have created a Video component
And
I edit the component
Then
I see the correct video settings and default values
# 2
# Safari has trouble saving values on Sauce
@skip_safari
Scenario
:
User can modify Video display name
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
Then
I can modify video display name
And
my video display name change is persisted on save
# 3
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario
:
Captions are hidden when "transcript display" is false
Given
I have created a Video component with subtitles
And
I have set
"transcript display"
to False
Then
when I view the video it does not show the captions
# 4
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario
:
Captions are shown when "transcript display" is true
Given
I have created a Video component with subtitles
And
I have set
"transcript display"
to True
Then
when I view the video it does show the captions
# 5
Scenario
:
Translations uploading works correctly
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And
I upload transcript file
"chinese_transcripts.srt"
for
"zh"
language code
And
I save changes
Then
when I view the video it does show the captions
And
I see
"好 各位同学"
text in the captions
And
I edit the component
And
I open tab
"Advanced"
And
I see translations for
"zh"
And
I upload transcript file
"uk_transcripts.srt"
for
"uk"
language code
And
I save changes
Then
when I view the video it does show the captions
And
I see
"好 各位同学"
text in the captions
And
video language menu has
"uk, zh"
translations
# 6
Scenario
:
User can upload transcript file with > 1mb size
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And
I upload transcript file
"1mb_transcripts.srt"
for
"uk"
language code
And
I save changes
Then
when I view the video it does show the captions
And
I see
"Привіт, edX вітає вас."
text in the captions
# 7
Scenario
:
Translations downloading works correctly w/ preliminary saving
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And I upload transcript files
:
|
lang_code
|
filename
|
|
uk
|
uk_transcripts.srt
|
|
zh
|
chinese_transcripts.srt
|
And
I save changes
And
I edit the component
And
I open tab
"Advanced"
And
I see translations for
"uk, zh"
And
video language menu has
"uk, zh"
translations
Then
I can download transcript for
"zh"
language code, that contains text
"好 各位同学"
And
I can download transcript for
"uk"
language code, that contains text
"Привіт, edX вітає вас."
# 8
Scenario
:
Translations downloading works correctly w/o preliminary saving
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And I upload transcript files
:
|
lang_code
|
filename
|
|
uk
|
uk_transcripts.srt
|
|
zh
|
chinese_transcripts.srt
|
Then
I can download transcript for
"zh"
language code, that contains text
"好 各位同学"
And
I can download transcript for
"uk"
language code, that contains text
"Привіт, edX вітає вас."
# 9
Scenario
:
Translations removing works correctly w/ preliminary saving
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And I upload transcript files
:
|
lang_code
|
filename
|
|
uk
|
uk_transcripts.srt
|
|
zh
|
chinese_transcripts.srt
|
And
I save changes
Then
when I view the video it does show the captions
And
I see
"Привіт, edX вітає вас."
text in the captions
And
video language menu has
"uk, zh"
translations
And
I edit the component
And
I open tab
"Advanced"
And
I see translations for
"uk, zh"
Then
I remove translation for
"uk"
language code
And
I save changes
Then
when I view the video it does show the captions
And
I see
"好 各位同学"
text in the captions
And
I edit the component
And
I open tab
"Advanced"
And
I see translations for
"zh"
Then
I remove translation for
"zh"
language code
And
I save changes
Then
when I view the video it does not show the captions
# 10
Scenario
:
Translations removing works correctly w/o preliminary saving
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And
I upload transcript file
"uk_transcripts.srt"
for
"uk"
language code
And
I see translations for
"uk"
Then
I remove translation for
"uk"
language code
And
I save changes
Then
when I view the video it does not show the captions
# 11
Scenario
:
Translations clearing works correctly w/ preliminary saving
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And I upload transcript files
:
|
lang_code
|
filename
|
|
uk
|
uk_transcripts.srt
|
|
zh
|
chinese_transcripts.srt
|
And
I save changes
Then
when I view the video it does show the captions
And
I see
"Привіт, edX вітає вас."
text in the captions
And
video language menu has
"uk, zh"
translations
And
I edit the component
And
I open tab
"Advanced"
And
I see translations for
"uk, zh"
And
I click button
"Clear"
And
I save changes
Then
when I view the video it does not show the captions
# 12
Scenario
:
Translations clearing works correctly w/o preliminary saving
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And I upload transcript files
:
|
lang_code
|
filename
|
|
uk
|
uk_transcripts.srt
|
|
zh
|
chinese_transcripts.srt
|
And
I click button
"Clear"
And
I save changes
Then
when I view the video it does not show the captions
# 13
Scenario
:
User cannot upload translations in sjson format
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And
I click button
"Add"
And
I choose
"uk"
language code
And
I try to upload transcript file
"uk_transcripts.sjson"
Then
I see validation error
"Only SRT files can be uploaded. Please select a file ending in .srt to upload."
# 14
Scenario
:
User can easy replace the translation by another one w/ preliminary saving
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And
I upload transcript file
"chinese_transcripts.srt"
for
"zh"
language code
And
I save changes
Then
when I view the video it does show the captions
And
I see
"好 各位同学"
text in the captions
And
I edit the component
And
I open tab
"Advanced"
And
I see translations for
"zh"
And
I replace transcript file for
"zh"
language code by
"uk_transcripts.srt"
And
I save changes
Then
when I view the video it does show the captions
And
I see
"Привіт, edX вітає вас."
text in the captions
# 15
Scenario
:
User can easy replace the translation by another one w/o preliminary saving
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And
I upload transcript file
"chinese_transcripts.srt"
for
"zh"
language code
And
I see translations for
"zh"
And
I replace transcript file for
"zh"
language code by
"uk_transcripts.srt"
And
I save changes
Then
when I view the video it does show the captions
And
I see
"Привіт, edX вітає вас."
text in the captions
# 16
Scenario
:
Upload "zh" file "A" -> Remove "zh" -> Upload "zh" file "B"
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And
I upload transcript file
"chinese_transcripts.srt"
for
"zh"
language code
And
I see translations for
"zh"
Then
I remove translation for
"zh"
language code
And
I upload transcript file
"uk_transcripts.srt"
for
"zh"
language code
And
I save changes
Then
when I view the video it does show the captions
And
I see
"Привіт, edX вітає вас."
text in the captions
# 17
Scenario
:
User cannot select the same language twice
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And
I click button
"Add"
And
I choose
"zh"
language code
And
I click button
"Add"
Then
I cannot choose
"zh"
language code
# 18
Scenario
:
User can see table of content at the first position
Given
I have created a Video component
And
I edit the component
And
I open tab
"Advanced"
And I upload transcript files
:
|
lang_code
|
filename
|
|
uk
|
uk_transcripts.srt
|
|
table
|
chinese_transcripts.srt
|
And
I save changes
Then
when I view the video it does show the captions
And
I see
"好 各位同学"
text in the captions
And
video language menu has
"table, uk"
translations
And
I see video language with code
"table"
at position
"0"
common/test/acceptance/pages/lms/video/video.py
View file @
f93e4f27
...
...
@@ -301,9 +301,7 @@ class VideoPage(PageObject):
str: Captions Text.
"""
# wait until captions rendered completely
captions_rendered_selector
=
self
.
get_element_selector
(
CSS_CLASS_NAMES
[
'captions_rendered'
])
self
.
wait_for_element_presence
(
captions_rendered_selector
,
'Captions Rendered'
)
self
.
wait_for_captions
()
captions_selector
=
self
.
get_element_selector
(
CSS_CLASS_NAMES
[
'captions_text'
])
subs
=
self
.
q
(
css
=
captions_selector
)
.
html
...
...
@@ -535,9 +533,7 @@ class VideoPage(PageObject):
captions_selector
=
self
.
get_element_selector
(
CSS_CLASS_NAMES
[
'captions'
])
EmptyPromise
(
lambda
:
self
.
q
(
css
=
captions_selector
)
.
visible
,
'Subtitles Visible'
)
.
fulfill
()
# wait until captions rendered completely
captions_rendered_selector
=
self
.
get_element_selector
(
CSS_CLASS_NAMES
[
'captions_rendered'
])
self
.
wait_for_element_presence
(
captions_rendered_selector
,
'Captions Rendered'
)
self
.
wait_for_captions
()
return
True
...
...
@@ -799,3 +795,10 @@ class VideoPage(PageObject):
classes
=
self
.
q
(
css
=
selector
)
.
attrs
(
'class'
)[
0
]
.
split
()
return
'active'
in
classes
def
wait_for_captions
(
self
):
"""
Wait until captions rendered completely.
"""
captions_rendered_selector
=
self
.
get_element_selector
(
CSS_CLASS_NAMES
[
'captions_rendered'
])
self
.
wait_for_element_presence
(
captions_rendered_selector
,
'Captions Rendered'
)
common/test/acceptance/pages/studio/video/video.py
View file @
f93e4f27
This diff is collapsed.
Click to expand it.
common/test/acceptance/tests/video/test_studio_video_editor.py
0 → 100644
View file @
f93e4f27
This diff is collapsed.
Click to expand it.
common/test/acceptance/tests/video/test_studio_video_module.py
View file @
f93e4f27
...
...
@@ -3,7 +3,7 @@
"""
Acceptance tests for CMS Video Module.
"""
from
nose.plugins.attrib
import
attr
from
unittest
import
skipIf
from
...pages.studio.auto_auth
import
AutoAuthPage
from
...pages.studio.overview
import
CourseOutlinePage
...
...
@@ -12,6 +12,7 @@ from ...fixtures.course import CourseFixture, XBlockFixtureDesc
from
..helpers
import
UniqueCourseTest
,
is_youtube_available
,
YouTubeStubConfig
@attr
(
'shard_2'
)
@skipIf
(
is_youtube_available
()
is
False
,
'YouTube is not available!'
)
class
CMSVideoBaseTest
(
UniqueCourseTest
):
"""
...
...
@@ -281,9 +282,9 @@ class CMSVideoTest(CMSVideoBaseTest):
self
.
open_advanced_tab
()
self
.
video
.
set_
settings_
field_value
(
'Video Start Time'
,
'00:00:12'
)
self
.
video
.
set_field_value
(
'Video Start Time'
,
'00:00:12'
)
self
.
video
.
set_
settings_
field_value
(
'Video Stop Time'
,
'00:00:24'
)
self
.
video
.
set_field_value
(
'Video Stop Time'
,
'00:00:24'
)
self
.
save_unit_settings
()
...
...
common/test/acceptance/tests/video/test_video_module.py
View file @
f93e4f27
...
...
@@ -3,7 +3,7 @@
"""
Acceptance tests for Video.
"""
from
nose.plugins.attrib
import
attr
from
unittest
import
skipIf
,
skip
from
..helpers
import
UniqueCourseTest
,
is_youtube_available
,
YouTubeStubConfig
from
...pages.lms.video.video
import
VideoPage
...
...
@@ -28,6 +28,7 @@ HTML5_SOURCES_INCORRECT = [
]
@attr
(
'shard_2'
)
@skipIf
(
is_youtube_available
()
is
False
,
'YouTube is not available!'
)
class
VideoBaseTest
(
UniqueCourseTest
):
"""
...
...
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