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
92f5246c
Commit
92f5246c
authored
Aug 08, 2013
by
Peter Fogg
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #543 from edx/peter-fogg/test-video-content
Add acceptance test for XML-only video content.
parents
36b88934
587d86bf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
cms/djangoapps/contentstore/features/video.feature
+4
-0
cms/djangoapps/contentstore/features/video.py
+39
-0
No files found.
cms/djangoapps/contentstore/features/video.feature
View file @
92f5246c
...
...
@@ -47,3 +47,7 @@ Feature: Video Component
Given
I have created a Video Alpha component
And
I have set
"show captions"
to True
Then
when I view the videoalpha it does show the captions
Scenario
:
Video data is shown correctly
Given
I have created a video with only XML data
Then
the correct Youtube video is shown
cms/djangoapps/contentstore/features/video.py
View file @
92f5246c
...
...
@@ -2,6 +2,9 @@
from
lettuce
import
world
,
step
from
terrain.steps
import
reload_the_page
from
xmodule.modulestore
import
Location
from
contentstore.utils
import
get_modulestore
############### ACTIONS ####################
...
...
@@ -44,3 +47,39 @@ def videoalpha_name_persisted(step):
reload_the_page
(
step
)
world
.
edit_component
()
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
'Display Name'
),
'Display Name'
,
'3.4'
,
True
)
@step
(
'I have created a video with only XML data'
)
def
xml_only_video
(
step
):
# Create a new video *without* metadata. This requires a certain
# amount of rummaging to make sure all the correct data is present
step
.
given
(
'I have clicked the new unit button'
)
# Wait for the new unit to be created and to load the page
world
.
wait
(
1
)
location
=
world
.
scenario_dict
[
'COURSE'
]
.
location
store
=
get_modulestore
(
location
)
parent_location
=
store
.
get_items
(
Location
(
category
=
'vertical'
,
revision
=
'draft'
))[
0
]
.
location
youtube_id
=
'ABCDEFG'
world
.
scenario_dict
[
'YOUTUBE_ID'
]
=
youtube_id
# Create a new Video component, but ensure that it doesn't have
# metadata. This allows us to test that we are correctly parsing
# out XML
video
=
world
.
ItemFactory
.
create
(
parent_location
=
parent_location
,
category
=
'video'
,
data
=
'<video youtube="1.00:
%
s"></video>'
%
youtube_id
)
# Refresh to see the new video
reload_the_page
(
step
)
@step
(
'The correct Youtube video is shown'
)
def
the_youtube_video_is_shown
(
_step
):
ele
=
world
.
css_find
(
'.video'
)
.
first
assert
ele
[
'data-youtube-id-1-0'
]
==
world
.
scenario_dict
[
'YOUTUBE_ID'
]
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