Revert "Merge pull request #18340 from cpennington/fix-studio-xblock-rendering"
This reverts commit9a70ca78a5, reversing changes made toefd5b9abbd. Hopefully fixes EDUCATOR-3053
This commit is contained in:
@@ -68,7 +68,8 @@ VIDEO_MENUS = {
|
||||
}
|
||||
|
||||
|
||||
@js_defined('window.Video', 'window.jQuery', 'window.MathJax')
|
||||
@js_defined('window.Video', 'window.RequireJS.require', 'window.jQuery',
|
||||
'window.MathJax', 'window.MathJax.isReady')
|
||||
class VideoPage(PageObject):
|
||||
"""
|
||||
Video player in the courseware.
|
||||
|
||||
@@ -29,7 +29,6 @@ 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 = {
|
||||
@@ -92,8 +91,8 @@ FIELDS_WO_CLEAR = [
|
||||
DELAY = 0.5
|
||||
|
||||
|
||||
@js_defined('window.Video', 'window.jQuery', 'window.XModule', 'window.XBlock',
|
||||
'window.MathJax')
|
||||
@js_defined('window.Video', 'window.RequireJS.require', 'window.jQuery', 'window.XModule', 'window.XBlock',
|
||||
'window.MathJax', 'window.MathJax.isReady')
|
||||
class VideoComponentPage(VideoPage):
|
||||
"""
|
||||
CMS Video Component Page
|
||||
@@ -103,10 +102,8 @@ 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)
|
||||
|
||||
@@ -740,39 +740,6 @@ class AcceptanceTest(WebAppTest):
|
||||
# Use long messages so that failures show actual and expected values
|
||||
self.longMessage = True # pylint: disable=invalid-name
|
||||
|
||||
def tearDown(self):
|
||||
try:
|
||||
self.browser.get('http://{}:{}'.format(
|
||||
os.environ.get('BOK_CHOY_HOSTNAME', '127.0.0.1'),
|
||||
os.environ.get('BOK_CHOY_LMS_PORT', 8003),
|
||||
))
|
||||
except: # pylint: disable=bare-except
|
||||
self.browser.get('http://{}:{}'.format(
|
||||
os.environ.get('BOK_CHOY_HOSTNAME', '127.0.0.1'),
|
||||
os.environ.get('BOK_CHOY_CMS_PORT', 8031),
|
||||
))
|
||||
logs = self.browser.execute_script("return window.localStorage.getItem('console_log_capture');")
|
||||
if not logs:
|
||||
return
|
||||
logs = json.loads(logs)
|
||||
|
||||
log_dir = path('test_root') / 'log'
|
||||
if 'shard' in os.environ:
|
||||
log_dir /= "shard_{}".format(os.environ["SHARD"])
|
||||
log_dir.mkdir_p()
|
||||
|
||||
with (log_dir / '{}.browser.log'.format(self.id()[:60])).open('w') as browser_log:
|
||||
for (message, url, line_no, col_no, stack) in logs:
|
||||
browser_log.write(u"{}:{}:{}: {}\n {}\n".format(
|
||||
url,
|
||||
line_no,
|
||||
col_no,
|
||||
message,
|
||||
(stack or "").replace('\n', '\n ')
|
||||
))
|
||||
|
||||
super(AcceptanceTest, self).tearDown()
|
||||
|
||||
|
||||
class UniqueCourseTest(AcceptanceTest):
|
||||
"""
|
||||
|
||||
@@ -9,8 +9,6 @@ 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
|
||||
@@ -143,11 +141,6 @@ 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):
|
||||
"""
|
||||
|
||||
@@ -26,20 +26,19 @@ from common.test.acceptance.tests.helpers import (
|
||||
)
|
||||
|
||||
VIDEO_SOURCE_PORT = 8777
|
||||
VIDEO_HOSTNAME = os.environ.get('BOK_CHOY_HOSTNAME', 'localhost')
|
||||
|
||||
HTML5_SOURCES = [
|
||||
'http://{}:{}/gizmo.mp4'.format(VIDEO_HOSTNAME, VIDEO_SOURCE_PORT),
|
||||
'http://{}:{}/gizmo.webm'.format(VIDEO_HOSTNAME, VIDEO_SOURCE_PORT),
|
||||
'http://{}:{}/gizmo.ogv'.format(VIDEO_HOSTNAME, VIDEO_SOURCE_PORT),
|
||||
'http://localhost:{0}/gizmo.mp4'.format(VIDEO_SOURCE_PORT),
|
||||
'http://localhost:{0}/gizmo.webm'.format(VIDEO_SOURCE_PORT),
|
||||
'http://localhost:{0}/gizmo.ogv'.format(VIDEO_SOURCE_PORT),
|
||||
]
|
||||
|
||||
HTML5_SOURCES_INCORRECT = [
|
||||
'http://{}:{}/gizmo.mp99'.format(VIDEO_HOSTNAME, VIDEO_SOURCE_PORT),
|
||||
'http://localhost:{0}/gizmo.mp99'.format(VIDEO_SOURCE_PORT),
|
||||
]
|
||||
|
||||
HLS_SOURCES = [
|
||||
'http://{}:{}/hls/history.m3u8'.format(VIDEO_HOSTNAME, VIDEO_SOURCE_PORT),
|
||||
'http://localhost:{0}/hls/history.m3u8'.format(VIDEO_SOURCE_PORT),
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user