From 46abe397e2a1767a28100bc9330dace6607dcc3e Mon Sep 17 00:00:00 2001 From: polesye Date: Fri, 4 Oct 2013 16:09:02 +0300 Subject: [PATCH] Fix acceptance tests. --- .../contentstore/features/video.feature | 16 ++++++++-------- cms/djangoapps/contentstore/features/video.py | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cms/djangoapps/contentstore/features/video.feature b/cms/djangoapps/contentstore/features/video.feature index d29893a047..940d7aaba3 100644 --- a/cms/djangoapps/contentstore/features/video.feature +++ b/cms/djangoapps/contentstore/features/video.feature @@ -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" diff --git a/cms/djangoapps/contentstore/features/video.py b/cms/djangoapps/contentstore/features/video.py index b5dba0a940..1b422294d0 100644 --- a/cms/djangoapps/contentstore/features/video.py +++ b/cms/djangoapps/contentstore/features/video.py @@ -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())