diff --git a/cms/djangoapps/contentstore/features/video.feature b/cms/djangoapps/contentstore/features/video.feature index 940ca30c94..e6a02fb6b2 100644 --- a/cms/djangoapps/contentstore/features/video.feature +++ b/cms/djangoapps/contentstore/features/video.feature @@ -57,3 +57,5 @@ Feature: CMS.Video Component Then Captions become visible And Hover over CC button Then Captions become visible + And Hover over volume button + Then Captions become visible diff --git a/cms/djangoapps/contentstore/features/video.py b/cms/djangoapps/contentstore/features/video.py index 022a99af52..a6a634024a 100644 --- a/cms/djangoapps/contentstore/features/video.py +++ b/cms/djangoapps/contentstore/features/video.py @@ -118,7 +118,7 @@ def the_youtube_video_is_shown(_step): @step('Make sure captions are (.+)$') -def make_sure_captions_are_closed(_step, captions_state): +def set_captions_visibility_state(_step, captions_state): if captions_state == 'closed': if world.css_visible('.subtitles'): world.browser.find_by_css('.hide-subtitles').click() @@ -127,9 +127,12 @@ def make_sure_captions_are_closed(_step, captions_state): world.browser.find_by_css('.hide-subtitles').click() -@step('Hover over CC button$') -def hover_over_cc_button(_step): - world.browser.find_by_css('.hide-subtitles').mouse_over() +@step('Hover over (.+) button$') +def hover_over_button(_step, button): + if button.strip() == 'CC': + world.browser.find_by_css('.hide-subtitles').mouse_over() + else: + world.browser.find_by_css('.volume').mouse_over() @step('Captions become (.+)$')