Fix acceptance tests.

This commit is contained in:
polesye
2013-10-04 16:09:02 +03:00
committed by Valera Rozuvan
parent 0bd706b6a1
commit 46abe397e2
2 changed files with 12 additions and 12 deletions

View File

@@ -45,26 +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 after 3 seconds
Then Captions become "invisible" after 3 seconds
And I hover over button "CC"
Then Captions become visible
Then Captions become "visible"
And I hover over button "volume"
Then Captions become invisible after 3 seconds
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 are visible
Then Captions are "visible"
And I hover over button "CC"
Then Captions are visible after 3 seconds
Then Captions are "visible" after 3 seconds
And I hover over button "volume"
Then Captions are visible after 3 seconds
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
Then Captions become "invisible" after 3 seconds
And I hover over button "volume"
Then Captions are invisible
Then Captions are "invisible"

View File

@@ -131,15 +131,15 @@ def set_captions_visibility_state(_step, captions_state):
@step('I hover over button "([^"]*)"$')
def hover_over_button(_step, button):
world.browser.find_by_css(BUTTONS[button.strip()]).mouse_over()
world.css_find(BUTTONS[button.strip()]).mouse_over()
@step('Captions (?:are|become) (.+)$')
@step('Captions (?:are|become) "([^"]*)"$')
def are_captions_visibile(_step, visibility_state):
_step.given('Captions are {0} after 0 seconds'.format(visibility_state))
_step.given('Captions become "{0}" after 0 seconds'.format(visibility_state))
@step('Captions (?:are|become) (.+) after (.+) seconds$')
@step('Captions (?:are|become) "([^"]*)" after (.+) seconds$')
def check_captions_visibility_state(_step, visibility_state, timeout):
timeout = int(timeout.strip())