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

Fix video bumper tests.
This commit is contained in:
Usman Khalid
2015-08-26 16:59:42 +05:00
6 changed files with 116 additions and 11 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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"
}
}
}