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
644af346
Commit
644af346
authored
Oct 18, 2013
by
Valera Rozuvan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial sketch of acceptance test for start end time range in slider.
parent
348b037b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
cms/djangoapps/contentstore/features/video.feature
+10
-0
cms/djangoapps/contentstore/features/video.py
+25
-0
No files found.
cms/djangoapps/contentstore/features/video.feature
View file @
644af346
...
...
@@ -77,3 +77,13 @@ Feature: CMS.Video Component
Then
I focus on caption line with data-index 0
Then
I press
"enter"
button on caption line with data-index 0
And
I see caption line with data-index 0 has class
"focused"
# 11
Scenario
:
When
start end end times are specified, a range on slider is shown
Given
I have created a Video component
And
I edit the component
And
Enter a start time of 10 seconds
And
Enter an end time of 20 seconds
And
I close the component editor
And
I click Play button
Then
I see a range on slider starting at 20 and running for 40 %
cms/djangoapps/contentstore/features/video.py
View file @
644af346
...
...
@@ -8,6 +8,8 @@ from selenium.webdriver.common.keys import Keys
BUTTONS
=
{
'CC'
:
'.hide-subtitles'
,
'volume'
:
'.volume'
,
'Play'
:
'.video_control.play'
,
'Save'
:
'save-button'
,
}
...
...
@@ -173,3 +175,26 @@ def caption_line_has_class(_step, index, className):
SELECTOR
=
".subtitles > li[data-index='{index}']"
.
format
(
index
=
int
(
index
.
strip
()))
world
.
css_has_class
(
SELECTOR
,
className
.
strip
())
@step
(
'Enter (?:a|an) (.+) time of (.+) seconds$'
)
def
enter_start_end_time
(
_step
,
type_of_time
,
time
):
type_of_time
=
type_of_time
.
strip
()
time
=
int
(
time
.
strip
())
@step
(
'I click (.+) button$'
)
def
click_a_button
(
_step
,
button
):
button
=
button
.
strip
(
button
)
world
.
browser
.
find_by_css
(
BUTTONS
[
button
])
.
click
()
@step
(
'I close the component editor$'
)
def
close_component_editor
(
_step
):
_step
.
given
(
'I click Save button'
)
@step
(
'I see a range on slider starting at (.+) and running for (.+)
%
$'
)
def
see_a_range_slider_with_proper_range
(
_step
,
left
,
width
):
left
=
int
(
left
.
strip
())
width
=
int
(
width
.
strip
())
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