Commit 6a1be48e by Usman Khalid

Merge pull request #9418 from edx/usman/tnl2883-video-tests

Fix video bumper tests.
parents 4aec2abf 0dbb969b
...@@ -604,9 +604,6 @@ class VideoPage(PageObject): ...@@ -604,9 +604,6 @@ class VideoPage(PageObject):
button = self.q(css=button_selector).results[0] 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 = ActionChains(self.browser).move_to_element(button)
hover.perform() hover.perform()
...@@ -617,7 +614,7 @@ class VideoPage(PageObject): ...@@ -617,7 +614,7 @@ class VideoPage(PageObject):
menu_items = self.q(css=menu_selector + ' a').results menu_items = self.q(css=menu_selector + ' a').results
for item in menu_items: for item in menu_items:
if item.get_attribute('data-value') == transcript_format: if item.get_attribute('data-value') == transcript_format:
item.click() ActionChains(self.browser).move_to_element(item).click().perform()
self.wait_for_ajax() self.wait_for_ajax()
break break
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
import datetime import datetime
import json import json
import ddt import ddt
from unittest import skip
from ..helpers import EventsTestMixin from ..helpers import EventsTestMixin
from .test_video_module import VideoBaseTest from .test_video_module import VideoBaseTest
...@@ -184,7 +183,7 @@ class VideoBumperEventsTest(VideoEventsTestMixin): ...@@ -184,7 +183,7 @@ class VideoBumperEventsTest(VideoEventsTestMixin):
u'video_bumper': { u'video_bumper': {
u'value': { u'value': {
"transcripts": {}, "transcripts": {},
"video_id": "edx_video_id" "video_id": "video_001"
} }
} }
} }
...@@ -196,7 +195,6 @@ class VideoBumperEventsTest(VideoEventsTestMixin): ...@@ -196,7 +195,6 @@ class VideoBumperEventsTest(VideoEventsTestMixin):
('edx.video.bumper.stopped', wait_for_state) ('edx.video.bumper.stopped', wait_for_state)
) )
@ddt.unpack @ddt.unpack
@skip("Failing on master; To see remove is_youtube_available() form base class")
def test_video_control_events(self, event_type, action): def test_video_control_events(self, event_type, action):
""" """
Scenario: Video component with pre-roll emits events correctly Scenario: Video component with pre-roll emits events correctly
...@@ -287,7 +285,6 @@ class VideoBumperEventsTest(VideoEventsTestMixin): ...@@ -287,7 +285,6 @@ class VideoBumperEventsTest(VideoEventsTestMixin):
} }
self.assert_events_match([expected_event], [video_event]) 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): 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 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): ...@@ -404,7 +404,6 @@ class YouTubeVideoTest(VideoBaseTest):
self.assertTrue(self.video.is_video_rendered('html5')) 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): def test_download_transcript_button_works_correctly(self):
""" """
Scenario: Download Transcript button works correctly Scenario: Download Transcript button works correctly
...@@ -713,7 +712,6 @@ class YouTubeVideoTest(VideoBaseTest): ...@@ -713,7 +712,6 @@ class YouTubeVideoTest(VideoBaseTest):
self.assertEqual(self.video.caption_languages, {'zh_HANS': 'Simplified Chinese', 'zh_HANT': 'Traditional Chinese'}) 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): def test_video_bumper_render(self):
""" """
Scenario: Multiple videos with bumper in sequentials all load and work, switching between sequentials Scenario: Multiple videos with bumper in sequentials all load and work, switching between sequentials
...@@ -738,7 +736,7 @@ class YouTubeVideoTest(VideoBaseTest): ...@@ -738,7 +736,7 @@ class YouTubeVideoTest(VideoBaseTest):
u'video_bumper': { u'video_bumper': {
u'value': { u'value': {
"transcripts": {}, "transcripts": {},
"video_id": "edx_video_id" "video_id": "video_001"
} }
} }
} }
......
[
{
"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
}
}
]
\ No newline at end of file
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