diff --git a/common/test/acceptance/pages/studio/video/video.py b/common/test/acceptance/pages/studio/video/video.py index c2caadca3c..94e1a7e0c2 100644 --- a/common/test/acceptance/pages/studio/video/video.py +++ b/common/test/acceptance/pages/studio/video/video.py @@ -29,6 +29,7 @@ CLASS_SELECTORS = { 'collapse_bar': '.videolist-extra-videos', 'status': '.transcripts-message-status', 'attach_transcript': '.file-chooser > input[type="file"]', + 'basic_metadata': '.basic_metadata_edit', } BUTTON_SELECTORS = { @@ -102,8 +103,10 @@ class VideoComponentPage(VideoPage): @wait_for_js def is_browser_on_page(self): - return self.q(css='div{0}'.format(CLASS_SELECTORS['video_xmodule'])).present or self.q( - css='div{0}'.format(CLASS_SELECTORS['xblock'])).present + return ( + self.q(css='div{0}'.format(CLASS_SELECTORS['video_xmodule'])).present or + self.q(css='div{0}'.format(CLASS_SELECTORS['xblock'])).present + ) def get_element_selector(self, class_name, vertical=False): return super(VideoComponentPage, self).get_element_selector(class_name, vertical=vertical) diff --git a/common/test/acceptance/tests/video/test_studio_video_module.py b/common/test/acceptance/tests/video/test_studio_video_module.py index 60bf97441c..f6b17f9a63 100644 --- a/common/test/acceptance/tests/video/test_studio_video_module.py +++ b/common/test/acceptance/tests/video/test_studio_video_module.py @@ -9,6 +9,8 @@ from unittest import skipIf from mock import patch from nose.plugins.attrib import attr +from bok_choy.promise import EmptyPromise + from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc from common.test.acceptance.pages.common.auto_auth import AutoAuthPage from common.test.acceptance.pages.studio.overview import CourseOutlinePage @@ -141,6 +143,7 @@ class CMSVideoBaseTest(UniqueCourseTest): xblock_index: number starting from 1 (0th entry is the unit page itself) """ self.unit_page.xblocks[xblock_index].edit() + EmptyPromise(lambda: self.video.q(css='div.basic_metadata_edit').visible, "Wait for the basic editor to be open", timeout=5).fulfill() def open_advanced_tab(self): """