Commit 72c058f2 by Muddasser

Merge pull request #12146 from…

Merge pull request #12146 from edx/muddasser/updated_ff/sel_253/test_youtube_id_w_different_local_server_sub

fixed button click issue while repacing subtitles.
parents 96cbc7c5 e9251713
......@@ -10,6 +10,7 @@ from ....tests.helpers import YouTubeStubConfig
from ...lms.video.video import VideoPage
from ...common.utils import wait_for_notification
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
CLASS_SELECTORS = {
......@@ -135,6 +136,13 @@ class VideoComponentPage(VideoPage):
"""
return self.q(css=CLASS_SELECTORS['video_controls']).visible
def click_button_subtitles(self):
"""
Click .setting-replace button after first hovering to it.
"""
element = self.q(css='.setting-replace')[0]
ActionChains(self.browser).move_to_element(element).click(element).perform()
def click_button(self, button_name, index=0, require_notification=False):
"""
Click on a button as specified by `button_name`
......
......@@ -177,7 +177,7 @@ class VideoTranscriptTest(CMSVideoBaseTest):
self.video.set_url_field('http://youtu.be/t_neq_exist', 1)
self.assertEqual(self.video.message('status'), 'Timed Transcript Conflict')
self.assertTrue(self.video.is_transcript_button_visible('replace'))
self.video.click_button('replace')
self.video.click_button_subtitles()
self.assertEqual(self.video.message('status'), 'Timed Transcript Found')
self.open_advanced_tab()
self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 't_neq_exist'))
......
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