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
2ed66ce7
Commit
2ed66ce7
authored
11 years ago
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated acceptance tests to match new behavior in video captions.
parent
df03b091
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
176 additions
and
12 deletions
+176
-12
cms/djangoapps/contentstore/features/video-editor.feature
+2
-2
cms/djangoapps/contentstore/features/video-editor.py
+7
-6
cms/djangoapps/contentstore/features/video.feature
+3
-3
cms/djangoapps/contentstore/features/video.py
+20
-1
common/test/data/uploads/subs_OEoXaMPEzfM.srt.sjson
+144
-0
No files found.
cms/djangoapps/contentstore/features/video-editor.feature
View file @
2ed66ce7
...
@@ -17,13 +17,13 @@ Feature: Video Component Editor
...
@@ -17,13 +17,13 @@ Feature: Video Component Editor
# Sauce Labs cannot delete cookies
# Sauce Labs cannot delete cookies
@skip_sauce
@skip_sauce
Scenario
:
Captions are hidden when "show captions" is false
Scenario
:
Captions are hidden when "show captions" is false
Given
I have created a Video component
Given
I have created a Video component
with subtitles
And
I have set
"show captions"
to False
And
I have set
"show captions"
to False
Then
when I view the video it does not show the captions
Then
when I view the video it does not show the captions
# Sauce Labs cannot delete cookies
# Sauce Labs cannot delete cookies
@skip_sauce
@skip_sauce
Scenario
:
Captions are shown when "show captions" is true
Scenario
:
Captions are shown when "show captions" is true
Given
I have created a Video component
Given
I have created a Video component
with subtitles
And
I have set
"show captions"
to True
And
I have set
"show captions"
to True
Then
when I view the video it does show the captions
Then
when I view the video it does show the captions
This diff is collapsed.
Click to expand it.
cms/djangoapps/contentstore/features/video-editor.py
View file @
2ed66ce7
...
@@ -7,20 +7,21 @@ from terrain.steps import reload_the_page
...
@@ -7,20 +7,21 @@ from terrain.steps import reload_the_page
@step
(
'I have set "show captions" to (.*)$'
)
@step
(
'I have set "show captions" to (.*)$'
)
def
set_show_captions
(
step
,
setting
):
def
set_show_captions
(
step
,
setting
):
# Prevent cookies from overriding course settings
world
.
browser
.
cookies
.
delete
(
'hide_captions'
)
world
.
css_click
(
'a.edit-button'
)
world
.
css_click
(
'a.edit-button'
)
world
.
wait_for
(
lambda
_driver
:
world
.
css_visible
(
'a.save-button'
))
world
.
wait_for
(
lambda
_driver
:
world
.
css_visible
(
'a.save-button'
))
world
.
browser
.
select
(
'Show Captions'
,
setting
)
world
.
browser
.
select
(
'Show Captions'
,
setting
)
world
.
css_click
(
'a.save-button'
)
world
.
css_click
(
'a.save-button'
)
@step
(
'when I view the (video.*) it (.*) show the captions$'
)
@step
(
'when I view the video it (.*) show the captions$'
)
def
shows_captions
(
_step
,
video_type
,
show_captions
):
def
shows_captions
(
_step
,
show_captions
):
# Prevent cookies from overriding course settings
world
.
browser
.
cookies
.
delete
(
'hide_captions'
)
if
show_captions
==
'does not'
:
if
show_captions
==
'does not'
:
assert
world
.
css_has_class
(
'.
%
s'
%
video_type
,
'
closed'
)
assert
world
.
is_css_present
(
'div.video.
closed'
)
else
:
else
:
assert
world
.
is_css_not_present
(
'
.
%
s.closed'
%
video_type
)
assert
world
.
is_css_not_present
(
'
div.video.closed'
)
@step
(
'I see the correct video settings and default values$'
)
@step
(
'I see the correct video settings and default values$'
)
...
...
This diff is collapsed.
Click to expand it.
cms/djangoapps/contentstore/features/video.feature
View file @
2ed66ce7
...
@@ -13,20 +13,20 @@ Feature: Video Component
...
@@ -13,20 +13,20 @@ Feature: Video Component
# Sauce Labs cannot delete cookies
# Sauce Labs cannot delete cookies
@skip_sauce
@skip_sauce
Scenario
:
Captions are hidden correctly
Scenario
:
Captions are hidden correctly
Given
I have created a Video component
Given
I have created a Video component
with subtitles
And
I have hidden captions
And
I have hidden captions
Then
when I view the video it does not show the captions
Then
when I view the video it does not show the captions
# Sauce Labs cannot delete cookies
# Sauce Labs cannot delete cookies
@skip_sauce
@skip_sauce
Scenario
:
Captions are shown correctly
Scenario
:
Captions are shown correctly
Given
I have created a Video component
Given
I have created a Video component
with subtitles
Then
when I view the video it does show the captions
Then
when I view the video it does show the captions
# Sauce Labs cannot delete cookies
# Sauce Labs cannot delete cookies
@skip_sauce
@skip_sauce
Scenario
:
Captions are toggled correctly
Scenario
:
Captions are toggled correctly
Given
I have created a Video component
Given
I have created a Video component
with subtitles
And
I have toggled captions
And
I have toggled captions
Then
when I view the video it does show the captions
Then
when I view the video it does show the captions
...
...
This diff is collapsed.
Click to expand it.
cms/djangoapps/contentstore/features/video.py
View file @
2ed66ce7
...
@@ -8,7 +8,6 @@ from contentstore.utils import get_modulestore
...
@@ -8,7 +8,6 @@ from contentstore.utils import get_modulestore
############### ACTIONS ####################
############### ACTIONS ####################
@step
(
'I have created a Video component$'
)
@step
(
'I have created a Video component$'
)
def
i_created_a_video_component
(
step
):
def
i_created_a_video_component
(
step
):
world
.
create_component_instance
(
world
.
create_component_instance
(
...
@@ -19,6 +18,26 @@ def i_created_a_video_component(step):
...
@@ -19,6 +18,26 @@ def i_created_a_video_component(step):
)
)
@step
(
'I have created a Video component with subtitles$'
)
def
i_created_a_video_component
(
step
):
step
.
given
(
'I have created a Video component'
)
# Store the current URL so we can return here
video_url
=
world
.
browser
.
url
# Upload subtitles for the video using the upload interface
step
.
given
(
'I have uploaded subtitles'
)
# Return to the video
world
.
visit
(
video_url
)
@step
(
'I have uploaded subtitles'
)
def
i_have_uploaded_subtitles
(
step
):
step
.
given
(
'I go to the files and uploads page'
)
step
.
given
(
'I upload the file "subs_OEoXaMPEzfM.srt.sjson"'
)
@step
(
'when I view the (.*) it does not have autoplay enabled$'
)
@step
(
'when I view the (.*) it does not have autoplay enabled$'
)
def
does_not_autoplay
(
_step
,
video_type
):
def
does_not_autoplay
(
_step
,
video_type
):
assert
world
.
css_find
(
'.
%
s'
%
video_type
)[
0
][
'data-autoplay'
]
==
'False'
assert
world
.
css_find
(
'.
%
s'
%
video_type
)[
0
][
'data-autoplay'
]
==
'False'
...
...
This diff is collapsed.
Click to expand it.
common/test/data/uploads/subs_OEoXaMPEzfM.srt.sjson
0 → 100644
View file @
2ed66ce7
{
"start": [
270,
2720,
5430,
7160,
10830,
12880,
15890,
19000,
22070,
25170,
27890,
30590,
32920,
36360,
39630,
41170,
42790,
44590,
47320,
50250,
51880,
54320,
57410,
59160,
62320,
65099,
68430,
71360,
73640,
76580,
78660,
81480,
83940,
86230,
88570,
90520,
93430,
95940,
99090,
100910,
103740,
105610,
108310,
111100,
112360
],
"end": [
2720,
5430,
7160,
10830,
12880,
15890,
19000,
22070,
25170,
27890,
30590,
32920,
36360,
39630,
41170,
42790,
44590,
47320,
50250,
51880,
54320,
57410,
59160,
62320,
65099,
68430,
71360,
73640,
76580,
78660,
81480,
83940,
86230,
88570,
90520,
93430,
95940,
99090,
100910,
103740,
105610,
108310,
111100,
112360,
114220
],
"text": [
"LILA FISHER: Hi, welcome to Edx.",
"I'm Lila Fisher, an Edx fellow helping to put",
"together these courses.",
"As you know, our courses are entirely online.",
"So before we start learning about the subjects that",
"brought you here, let's learn about the tools that you will",
"use to navigate through the course material.",
"Let's start with what is on your screen right now.",
"You are watching a video of me talking.",
"You have several tools associated with these videos.",
"Some of them are standard video buttons, like the play",
"Pause Button on the bottom left.",
"Like most video players, you can see how far you are into",
"this particular video segment and how long the entire video",
"segment is.",
"Something that you might not be used to",
"is the speed option.",
"While you are going through the videos, you can speed up",
"or slow down the video player with these buttons.",
"Go ahead and try that now.",
"Make me talk faster and slower.",
"If you ever get frustrated by the pace of speech, you can",
"adjust it this way.",
"Another great feature is the transcript on the side.",
"This will follow along with everything that I am saying as",
"I am saying it, so you can read along if you like.",
"You can also click on any of the words, and you will notice",
"that the video jumps to that word.",
"The video slider at the bottom of the video will let you",
"navigate through the video quickly.",
"If you ever find the transcript distracting, you",
"can toggle the captioning button in order to make it go",
"away or reappear.",
"Now that you know about the video player, I want to point",
"out the sequence navigator.",
"Right now you're in a lecture sequence, which interweaves",
"many videos and practice exercises.",
"You can see how far you are in a particular sequence by",
"observing which tab you're on.",
"You can navigate directly to any video or exercise by",
"clicking on the appropriate tab.",
"You can also progress to the next element by pressing the",
"Arrow button, or by clicking on the next tab.",
"Try that now.",
"The tutorial will continue in the next video."
]
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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