'Loads transcripts so that closed-captioning is available.
Ensures they are draggable by checking start and dropped location.'

def test_if_captions_are_draggable(self):

    self.assets.append('subs_3_yD_cEKoCk.srt.sjson')
    data = {'sub': '3_yD_cEKoCk'}
    self.metadata = self.metadata_for_mode('html5', additional_data=data)
    self.navigate_to_video()
    self.assertTrue(self.video.is_video_rendered('html5'))
    self.video.show_closed_captions()
    self.video.wait_for_closed_captions()
    self.assertTrue(self.video.is_closed_captions_visible)
    action = ActionChains(self.browser)
    captions = self.browser.find_element(By.CLASS_NAME, 'closed-captions')
    captions_start = captions.location
    action.drag_and_drop_by_offset(captions, 0, (-15)).perform()
    captions_end = captions.location
    if (self.browser.name == 'chrome'):
        self.assertEqual((captions_end.get('y') - 168), captions_start.get('y'), 'Closed    captions    did    not    get    dragged.')
    else:
        self.assertEqual((captions_end.get('y') + 16), captions_start.get('y'), 'Closed    captions    did    not    get    dragged.')
