Explicitly wait for the video editor to have opened when editing
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user