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
e76ef3aa
Commit
e76ef3aa
authored
Jun 18, 2013
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Combined video and videoalpha acceptance tests.
Resolved conflict between two steps with the same name.
parent
6f95d21e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
39 deletions
+29
-39
lms/djangoapps/courseware/features/video.feature
+7
-3
lms/djangoapps/courseware/features/video.py
+22
-0
lms/djangoapps/courseware/features/videoalpha.py
+0
-36
No files found.
lms/djangoapps/courseware/features/video.feature
View file @
e76ef3aa
Feature
:
Video component
Feature
:
Video component
As a student, I want to view course videos in LMS.
As a student, I want to view course videos in LMS.
Scenario
:
Autoplay is enabled in LMS
Scenario
:
Autoplay is enabled in LMS for a Video component
Given
the course has a Video component
Given
the course has a Video component
Then
when I view the video it has autoplay enabled
Then
when I view the video it has autoplay enabled
Scenario
:
Autoplay is enabled in the LMS for a VideoAlpha component
Given
the course has a VideoAlpha component
Then
when I view the video it has autoplay enabled
lms/djangoapps/courseware/features/video.py
View file @
e76ef3aa
...
@@ -27,8 +27,30 @@ def view_video(_step):
...
@@ -27,8 +27,30 @@ def view_video(_step):
world
.
browser
.
visit
(
url
)
world
.
browser
.
visit
(
url
)
@step
(
'the course has a VideoAlpha component'
)
def
view_videoalpha
(
step
):
coursename
=
TEST_COURSE_NAME
.
replace
(
' '
,
'_'
)
i_am_registered_for_the_course
(
step
,
coursename
)
# Make sure we have a videoalpha
add_videoalpha_to_course
(
coursename
)
chapter_name
=
TEST_SECTION_NAME
.
replace
(
" "
,
"_"
)
section_name
=
chapter_name
url
=
django_url
(
'/courses/edx/Test_Course/Test_Course/courseware/
%
s/
%
s'
%
(
chapter_name
,
section_name
))
world
.
browser
.
visit
(
url
)
def
add_video_to_course
(
course
):
def
add_video_to_course
(
course
):
template_name
=
'i4x://edx/templates/video/default'
template_name
=
'i4x://edx/templates/video/default'
world
.
ItemFactory
.
create
(
parent_location
=
section_location
(
course
),
world
.
ItemFactory
.
create
(
parent_location
=
section_location
(
course
),
template
=
template_name
,
template
=
template_name
,
display_name
=
'Video'
)
display_name
=
'Video'
)
def
add_videoalpha_to_course
(
course
):
template_name
=
'i4x://edx/templates/videoalpha/default'
world
.
ItemFactory
.
create
(
parent_location
=
section_location
(
course
),
template
=
template_name
,
display_name
=
'Video Alpha 1'
)
lms/djangoapps/courseware/features/videoalpha.py
deleted
100644 → 0
View file @
6f95d21e
#pylint: disable=C0111
#pylint: disable=W0613
#pylint: disable=W0621
from
lettuce
import
world
,
step
from
lettuce.django
import
django_url
from
common
import
TEST_COURSE_NAME
,
TEST_SECTION_NAME
,
i_am_registered_for_the_course
,
section_location
############### ACTIONS ####################
@step
(
'when I view the video it has autoplay enabled'
)
def
does_autoplay
(
step
):
assert
(
world
.
css_find
(
'.videoalpha'
)[
0
][
'data-autoplay'
]
==
'True'
)
@step
(
'the course has a Video component'
)
def
view_videoalpha
(
step
):
coursename
=
TEST_COURSE_NAME
.
replace
(
' '
,
'_'
)
i_am_registered_for_the_course
(
step
,
coursename
)
# Make sure we have a videoalpha
add_videoalpha_to_course
(
coursename
)
chapter_name
=
TEST_SECTION_NAME
.
replace
(
" "
,
"_"
)
section_name
=
chapter_name
url
=
django_url
(
'/courses/edx/Test_Course/Test_Course/courseware/
%
s/
%
s'
%
(
chapter_name
,
section_name
))
world
.
browser
.
visit
(
url
)
def
add_videoalpha_to_course
(
course
):
template_name
=
'i4x://edx/templates/videoalpha/default'
world
.
ItemFactory
.
create
(
parent_location
=
section_location
(
course
),
template
=
template_name
,
display_name
=
'Video Alpha 1'
)
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