diff --git a/common/test/acceptance/pages/lms/video/video.py b/common/test/acceptance/pages/lms/video/video.py index c730023466..4a8c3489ff 100644 --- a/common/test/acceptance/pages/lms/video/video.py +++ b/common/test/acceptance/pages/lms/video/video.py @@ -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 diff --git a/common/test/acceptance/tests/video/test_video_events.py b/common/test/acceptance/tests/video/test_video_events.py index ec7bceaa30..629fb6db06 100644 --- a/common/test/acceptance/tests/video/test_video_events.py +++ b/common/test/acceptance/tests/video/test_video_events.py @@ -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 diff --git a/common/test/acceptance/tests/video/test_video_module.py b/common/test/acceptance/tests/video/test_video_module.py index 16ef14e19a..2bd5704181 100644 --- a/common/test/acceptance/tests/video/test_video_module.py +++ b/common/test/acceptance/tests/video/test_video_module.py @@ -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" } } } diff --git a/common/test/db_fixtures/edxval.json b/common/test/db_fixtures/edxval.json new file mode 100644 index 0000000000..cecc4ee82f --- /dev/null +++ b/common/test/db_fixtures/edxval.json @@ -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 + } + } +] \ No newline at end of file diff --git a/test_root/data/video/intro.mp4 b/test_root/data/video/intro.mp4 new file mode 100644 index 0000000000..591a1e6b66 Binary files /dev/null and b/test_root/data/video/intro.mp4 differ diff --git a/test_root/data/video/intro.webm b/test_root/data/video/intro.webm new file mode 100644 index 0000000000..a07be5e590 Binary files /dev/null and b/test_root/data/video/intro.webm differ