Commit 8f3a865c by Nimisha Asthagiri

Fix flaky test: test_youtube_id_w_different_local_server_sub

TNL-5759
parent 0928cfde
......@@ -124,6 +124,12 @@ class VideoComponentPage(VideoPage):
'Video Buffering Completed')
self._wait_for(self.is_controls_visible, 'Player Controls are Visible')
def wait_for_message(self, message_type, expected_message):
"""
Wait until the message of the requested type is as expected.
"""
self._wait_for(lambda: self.message(message_type) == expected_message, "Waiting for message update.")
@wait_for_js
def is_controls_visible(self):
"""
......
......@@ -178,7 +178,7 @@ class VideoTranscriptTest(CMSVideoBaseTest):
self.assertEqual(self.video.message('status'), 'Timed Transcript Conflict')
self.assertTrue(self.video.is_transcript_button_visible('replace'))
self.video.click_button_subtitles()
self.assertEqual(self.video.message('status'), 'Timed Transcript Found')
self.video.wait_for_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