Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
1941474a
Commit
1941474a
authored
11 years ago
by
Valera Rozuvan
Browse files
Options
Downloads
Patches
Plain Diff
Fixing test for range element in slider.
parent
644af346
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cms/djangoapps/contentstore/features/video.feature
+5
-5
5 additions, 5 deletions
cms/djangoapps/contentstore/features/video.feature
cms/djangoapps/contentstore/features/video.py
+29
-13
29 additions, 13 deletions
cms/djangoapps/contentstore/features/video.py
with
34 additions
and
18 deletions
cms/djangoapps/contentstore/features/video.feature
+
5
−
5
View file @
1941474a
...
...
@@ -82,8 +82,8 @@ Feature: CMS.Video Component
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 %
And
I set value
"12"
to the field
"Start Time"
And
I set value
"24"
to the field
"End Time"
And
I
save changes
And
I click button
"Play"
Then
I see a range on slider
with styles
"left"
set to 10 and
"width"
set to 10
This diff is collapsed.
Click to expand it.
cms/djangoapps/contentstore/features/video.py
+
29
−
13
View file @
1941474a
...
...
@@ -9,9 +9,11 @@ BUTTONS = {
'
CC
'
:
'
.hide-subtitles
'
,
'
volume
'
:
'
.volume
'
,
'
Play
'
:
'
.video_control.play
'
,
'
Save
'
:
'
save-button
'
,
}
# We should wait 300 ms for event handler invocation + 200ms for safety.
DELAY
=
0.5
@step
(
'
I have created a Video component$
'
)
def
i_created_a_video_component
(
step
):
...
...
@@ -176,25 +178,39 @@ def caption_line_has_class(_step, index, className):
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 set value
"
([^
"
]*)
"
to the field
"
([^
"
]*)
"
$
'
)
def
set_value_transcripts_field
(
_step
,
value
,
field_name
):
world
.
wait
(
DELAY
)
world
.
wait_for_ajax_complete
()
field_id
=
'
#
'
+
world
.
browser
.
find_by_xpath
(
'
//label[text()=
"
%s
"
]
'
%
field_name
.
strip
())[
0
][
'
for
'
]
world
.
css_fill
(
field_id
,
value
.
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 save changes$
'
)
def
save_changes
(
_step
):
world
.
wait
(
DELAY
)
world
.
wait_for_ajax_complete
()
save_css
=
'
a.save-button
'
world
.
css_click
(
save_css
)
@step
(
'
I close the component editor$
'
)
def
close_component_editor
(
_step
):
_step
.
given
(
'
I click Save button
'
)
@step
(
'
I click button
"
([^
"
]*)
"
$
'
)
def
click_button
(
_step
,
button_type
):
world
.
wait
(
DELAY
)
world
.
wait_for_ajax_complete
()
button
=
button_type
.
strip
()
world
.
css_click
(
BUTTONS
[
button
])
@step
(
'
I see a range on slider
starting at (.+) and running for
(.+)
%
$
'
)
@step
(
'
I see a range on slider
with styles
"
left
"
set to (.+) and
"
width
"
set to
(.+)$
'
)
def
see_a_range_slider_with_proper_range
(
_step
,
left
,
width
):
left
=
int
(
left
.
strip
())
width
=
int
(
width
.
strip
())
world
.
wait_for_visible
(
"
.slider-range
"
)
slider_range
=
world
.
css_find
(
"
.slider-range
"
)[
0
]
assert
"
left: {}%;
"
.
format
(
left
)
in
slider_range
.
outer_html
assert
"
width: {}%;
"
.
format
(
width
)
in
slider_range
.
outer_html
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment