Commit eefd9f23 by zubair-arbi

Merge pull request #5243 from edx/zub/bugfix/tnl-392-videocontrolstestfailure

wait for notification on adding video component
parents 3f5b829d b2b46332
......@@ -9,6 +9,7 @@ from bok_choy.javascript import wait_for_js, js_defined
from ....tests.helpers import YouTubeStubConfig
from ...lms.video.video import VideoPage
from selenium.webdriver.common.keys import Keys
from ..utils import wait_for_notification
CLASS_SELECTORS = {
......@@ -132,7 +133,7 @@ class VideoComponentPage(VideoPage):
"""
return self.q(css=CLASS_SELECTORS['video_controls']).visible
def click_button(self, button_name, index=0):
def click_button(self, button_name, index=0, require_notification=False):
"""
Click on a button as specified by `button_name`
......@@ -142,6 +143,8 @@ class VideoComponentPage(VideoPage):
"""
self.q(css=BUTTON_SELECTORS[button_name]).nth(index).click()
if require_notification:
wait_for_notification(self)
self.wait_for_ajax()
@staticmethod
......@@ -237,7 +240,7 @@ class VideoComponentPage(VideoPage):
Create a Video Component by clicking on Video button and wait for rendering completion.
"""
# Create video
self.click_button('create_video')
self.click_button('create_video', require_notification=True)
self.wait_for_video_component_render()
def xblocks(self):
......
......@@ -4,7 +4,7 @@
Acceptance tests for CMS Video Module.
"""
from nose.plugins.attrib import attr
from unittest import skipIf, skip
from unittest import skipIf
from ...pages.studio.auto_auth import AutoAuthPage
from ...pages.studio.overview import CourseOutlinePage
from ...pages.studio.video.video import VideoComponentPage
......@@ -227,7 +227,6 @@ class CMSVideoTest(CMSVideoBaseTest):
self.assertFalse(self.video.is_captions_visible())
@skip('TNL-392')
def test_video_controls_shown_correctly(self):
"""
Scenario: Video controls for all videos show correctly
......
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