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
e1e0cba0
Commit
e1e0cba0
authored
Oct 02, 2013
by
Valera Rozuvan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added acceptance tests.
parent
2a6418ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
0 deletions
+55
-0
cms/djangoapps/contentstore/features/video.feature
+22
-0
cms/djangoapps/contentstore/features/video.py
+26
-0
lms/djangoapps/courseware/features/video.feature
+7
-0
No files found.
cms/djangoapps/contentstore/features/video.feature
View file @
e1e0cba0
...
...
@@ -2,15 +2,18 @@
Feature
:
CMS.Video Component
As a course author, I want to be able to view my created videos in Studio.
# 1
# Video Alpha Features will work in Firefox only when Firefox is the active window
Scenario
:
Autoplay is disabled in Studio
Given
I have created a Video component
Then
when I view the video it does not have autoplay enabled
# 2
Scenario
:
Creating a video takes a single click
Given
I have clicked the new unit button
Then
creating a video takes a single click
# 3
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario
:
Captions are hidden correctly
...
...
@@ -18,12 +21,14 @@ Feature: CMS.Video Component
And
I have hidden captions
Then
when I view the video it does not show the captions
# 4
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario
:
Captions are shown correctly
Given
I have created a Video component with subtitles
Then
when I view the video it does show the captions
# 5
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario
:
Captions are toggled correctly
...
...
@@ -31,6 +36,23 @@ Feature: CMS.Video Component
And
I have toggled captions
Then
when I view the video it does show the captions
# 6
Scenario
:
Video data is shown correctly
Given
I have created a video with only XML data
Then
the correct Youtube video is shown
# 7
Scenario
:
Closed captions become visible when the mouse hovers over CC button
Given
I have created a Video component with subtitles
And
Make sure captions are closed
Then
Captions become invisible
And
Hover over CC button
Then
Captions become visible
# 8
Scenario
:
Open captions never become invisible
Given
I have created a Video component with subtitles
And
Make sure captions are open
Then
Captions become visible
And
Hover over CC button
Then
Captions become visible
cms/djangoapps/contentstore/features/video.py
View file @
e1e0cba0
...
...
@@ -108,3 +108,29 @@ def the_youtube_video_is_shown(_step):
ele
=
world
.
css_find
(
'.video'
)
.
first
assert
ele
[
'data-streams'
]
.
split
(
':'
)[
1
]
==
world
.
scenario_dict
[
'YOUTUBE_ID'
]
@step
(
'Make sure captions are (.+)$'
)
def
make_sure_captions_are_closed
(
_step
,
captions_state
):
if
captions_state
==
'closed'
:
if
world
.
css_visible
(
'.subtitles'
):
world
.
browser
.
find_by_css
(
'.hide-subtitles'
)
.
click
()
else
:
if
not
world
.
css_visible
(
'.subtitles'
):
world
.
browser
.
find_by_css
(
'.hide-subtitles'
)
.
click
()
@step
(
'Hover over CC button$'
)
def
hover_over_cc_button
(
_step
):
world
.
browser
.
find_by_css
(
'.hide-subtitles'
)
.
mouse_over
()
@step
(
'Captions become (.+)$'
)
def
captions_become_visible
(
_step
,
visibility_state
):
# Captions become invisible by fading out. We must wait.
world
.
wait
(
2
)
if
visibility_state
==
'visible'
:
assert
world
.
css_visible
(
'.subtitles'
)
else
:
assert
not
world
.
css_visible
(
'.subtitles'
)
lms/djangoapps/courseware/features/video.feature
View file @
e1e0cba0
...
...
@@ -2,38 +2,45 @@
Feature
:
LMS.Video component
As a student, I want to view course videos in LMS.
# 1
Scenario
:
Video component is fully rendered in the LMS in HTML5 mode
Given
the course has a Video component in HTML5 mode
Then
when I view the video it has rendered in HTML5 mode
And
all sources are correct
# 2
# Firefox doesn't have HTML5 (only mp4 - fix here)
@skip_firefox
Scenario
:
Autoplay is disabled in LMS for a Video component
Given
the course has a Video component in HTML5 mode
Then
when I view the video it does not have autoplay enabled
# 3
# Youtube testing
Scenario
:
Video component is fully rendered in the LMS in Youtube mode with HTML5 sources
Given
youtube server is up and response time is 0.4 seconds
And
the course has a Video component in Youtube_HTML5 mode
Then
when I view the video it has rendered in Youtube mode
# 4
Scenario
:
Video component is not rendered in the LMS in Youtube mode with HTML5 sources
Given
youtube server is up and response time is 2 seconds
And
the course has a Video component in Youtube_HTML5 mode
Then
when I view the video it has rendered in HTML5 mode
# 5
Scenario
:
Video component is rendered in the LMS in Youtube mode without HTML5 sources
Given
youtube server is up and response time is 2 seconds
And
the course has a Video component in Youtube mode
Then
when I view the video it has rendered in Youtube mode
# 6
Scenario
:
Video component is rendered in the LMS in Youtube mode with HTML5 sources that doesn't supported by browser
Given
youtube server is up and response time is 2 seconds
And
the course has a Video component in Youtube_HTML5_Unsupported_Video mode
Then
when I view the video it has rendered in Youtube mode
# 7
Scenario
:
Video component is rendered in the LMS in HTML5 mode with HTML5 sources that doesn't supported by browser
Given
the course has a Video component in HTML5_Unsupported_Video mode
Then
error message is shown
...
...
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