Commit 644af346 by Valera Rozuvan

Initial sketch of acceptance test for start end time range in slider.

parent 348b037b
......@@ -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 %
......@@ -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())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment