Commit 55fde6e5 by Valera Rozuvan

Updated acceptance tests.

parent 1f840530
......@@ -45,16 +45,26 @@ Feature: CMS.Video Component
Scenario: Closed captions become visible when the mouse hovers over CC button
Given I have created a Video component with subtitles
And Make sure captions are closed
Then Captions become invisible
Then Captions become invisible after 3 seconds
And Hover over CC button
Then Captions become visible
Then Captions become visible after 0 seconds
And Hover over volume button
Then Captions become invisible after 3 seconds
# 8
Scenario: Open captions never become invisible
Given I have created a Video component with subtitles
And Make sure captions are open
Then Captions become visible
Then Captions are visible after 0 seconds
And Hover over CC button
Then Captions become visible
Then Captions are visible after 3 seconds
And Hover over volume button
Then Captions are visible after 3 seconds
# 9
Scenario: Closed captions are invisible when mouse doesn't hover on CC button
Given I have created a Video component with subtitles
And Make sure captions are closed
Then Captions become invisible after 3 seconds
And Hover over volume button
Then Captions become visible
Then Captions are invisible after 0 seconds
......@@ -127,13 +127,21 @@ def hover_over_button(_step, button):
world.browser.find_by_css('.volume').mouse_over()
@step('Captions become (.+)$')
def captions_become_visible(_step, visibility_state):
# Captions become invisible by fading out. We must wait.
world.wait(2)
@step('Captions become (.+) after (.+) seconds$')
def check_captions_visibility_state(_step, visibility_state, timeout):
timeout = int(timeout.strip())
# Captions become invisible by fading out. We must wait by a specified
# time.
world.wait(timeout)
if visibility_state == 'visible':
assert world.css_visible('.subtitles')
else:
assert not world.css_visible('.subtitles')
@step('Captions are (.+) after (.+) seconds$')
def check_captions_visibility_state2(_step, visibility_state, timeout):
check_captions_visibility_state(_step, visibility_state, timeout)
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