Merge pull request #9418 from edx/usman/tnl2883-video-tests
Fix video bumper tests.
This commit is contained in:
@@ -604,9 +604,6 @@ class VideoPage(PageObject):
|
||||
|
||||
button = self.q(css=button_selector).results[0]
|
||||
|
||||
coord_y = button.location_once_scrolled_into_view['y']
|
||||
self.browser.execute_script("window.scrollTo(0, {});".format(coord_y))
|
||||
|
||||
hover = ActionChains(self.browser).move_to_element(button)
|
||||
hover.perform()
|
||||
|
||||
@@ -617,7 +614,7 @@ class VideoPage(PageObject):
|
||||
menu_items = self.q(css=menu_selector + ' a').results
|
||||
for item in menu_items:
|
||||
if item.get_attribute('data-value') == transcript_format:
|
||||
item.click()
|
||||
ActionChains(self.browser).move_to_element(item).click().perform()
|
||||
self.wait_for_ajax()
|
||||
break
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
import datetime
|
||||
import json
|
||||
import ddt
|
||||
from unittest import skip
|
||||
|
||||
from ..helpers import EventsTestMixin
|
||||
from .test_video_module import VideoBaseTest
|
||||
@@ -184,7 +183,7 @@ class VideoBumperEventsTest(VideoEventsTestMixin):
|
||||
u'video_bumper': {
|
||||
u'value': {
|
||||
"transcripts": {},
|
||||
"video_id": "edx_video_id"
|
||||
"video_id": "video_001"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -196,7 +195,6 @@ class VideoBumperEventsTest(VideoEventsTestMixin):
|
||||
('edx.video.bumper.stopped', wait_for_state)
|
||||
)
|
||||
@ddt.unpack
|
||||
@skip("Failing on master; To see remove is_youtube_available() form base class")
|
||||
def test_video_control_events(self, event_type, action):
|
||||
"""
|
||||
Scenario: Video component with pre-roll emits events correctly
|
||||
@@ -287,7 +285,6 @@ class VideoBumperEventsTest(VideoEventsTestMixin):
|
||||
}
|
||||
self.assert_events_match([expected_event], [video_event])
|
||||
|
||||
@skip("Failing on master; To see remove is_youtube_available() form base class")
|
||||
def test_strict_event_format(self):
|
||||
"""
|
||||
This test makes a very strong assertion about the fields present in events. The goal of it is to ensure that new
|
||||
|
||||
@@ -404,7 +404,6 @@ class YouTubeVideoTest(VideoBaseTest):
|
||||
|
||||
self.assertTrue(self.video.is_video_rendered('html5'))
|
||||
|
||||
@skip('Failing on master; To see remove is_youtube_available() form base class')
|
||||
def test_download_transcript_button_works_correctly(self):
|
||||
"""
|
||||
Scenario: Download Transcript button works correctly
|
||||
@@ -713,7 +712,6 @@ class YouTubeVideoTest(VideoBaseTest):
|
||||
|
||||
self.assertEqual(self.video.caption_languages, {'zh_HANS': 'Simplified Chinese', 'zh_HANT': 'Traditional Chinese'})
|
||||
|
||||
@skip('Failing on master; To see remove is_youtube_available() form base class')
|
||||
def test_video_bumper_render(self):
|
||||
"""
|
||||
Scenario: Multiple videos with bumper in sequentials all load and work, switching between sequentials
|
||||
@@ -738,7 +736,7 @@ class YouTubeVideoTest(VideoBaseTest):
|
||||
u'video_bumper': {
|
||||
u'value': {
|
||||
"transcripts": {},
|
||||
"video_id": "edx_video_id"
|
||||
"video_id": "video_001"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
113
common/test/db_fixtures/edxval.json
Normal file
113
common/test/db_fixtures/edxval.json
Normal file
@@ -0,0 +1,113 @@
|
||||
[
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "edxval.profile",
|
||||
"fields": {
|
||||
"profile_name": "desktop_mp4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "edxval.profile",
|
||||
"fields": {
|
||||
"profile_name": "desktop_webm"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 3,
|
||||
"model": "edxval.profile",
|
||||
"fields": {
|
||||
"profile_name": "mobile_high"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 4,
|
||||
"model": "edxval.profile",
|
||||
"fields": {
|
||||
"profile_name": "mobile_low"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 5,
|
||||
"model": "edxval.profile",
|
||||
"fields": {
|
||||
"profile_name": "youtube"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "edxval.video",
|
||||
"fields": {
|
||||
"duration": 20.6,
|
||||
"status": "File Complete",
|
||||
"edx_video_id": "video_001",
|
||||
"client_video_id": "Demo",
|
||||
"created": "2015-07-30T10:14:50Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "edxval.encodedvideo",
|
||||
"fields": {
|
||||
"profile": 3,
|
||||
"created": "2015-07-30T10:14:50Z",
|
||||
"url": "http://localhost:8777/intro.mp4",
|
||||
"modified": "2015-07-30T10:14:50Z",
|
||||
"video": 1,
|
||||
"file_size": 15188012,
|
||||
"bitrate": 672
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "edxval.encodedvideo",
|
||||
"fields": {
|
||||
"profile": 4,
|
||||
"created": "2015-07-30T10:14:50Z",
|
||||
"url": "http://localhost:8777/intro.mp4",
|
||||
"modified": "2015-07-30T10:14:50Z",
|
||||
"video": 1,
|
||||
"file_size": 6185643,
|
||||
"bitrate": 273
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 3,
|
||||
"model": "edxval.encodedvideo",
|
||||
"fields": {
|
||||
"profile": 1,
|
||||
"created": "2015-07-30T10:14:50Z",
|
||||
"url": "http://localhost:8777/intro.mp4",
|
||||
"modified": "2015-07-30T10:14:50Z",
|
||||
"video": 1,
|
||||
"file_size": 56933999,
|
||||
"bitrate": 2521
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 4,
|
||||
"model": "edxval.encodedvideo",
|
||||
"fields": {
|
||||
"profile": 2,
|
||||
"created": "2015-07-30T10:14:50Z",
|
||||
"url": "http://localhost:8777/intro.webm",
|
||||
"modified": "2015-07-30T10:14:50Z",
|
||||
"video": 1,
|
||||
"file_size": 24415064,
|
||||
"bitrate": 1081
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 5,
|
||||
"model": "edxval.encodedvideo",
|
||||
"fields": {
|
||||
"profile": 5,
|
||||
"created": "2015-07-30T10:14:50Z",
|
||||
"url": "zeYD3qMxKrI",
|
||||
"modified": "2015-07-30T10:14:50Z",
|
||||
"video": 1,
|
||||
"file_size": 0,
|
||||
"bitrate": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
BIN
test_root/data/video/intro.mp4
Normal file
BIN
test_root/data/video/intro.mp4
Normal file
Binary file not shown.
BIN
test_root/data/video/intro.webm
Normal file
BIN
test_root/data/video/intro.webm
Normal file
Binary file not shown.
Reference in New Issue
Block a user