'Scenario: Download \'srt\' transcript link works correctly.
Download \'txt\' transcript link works correctly.
Given the course has Video components A and B in "Youtube" mode
And Video component C in "HTML5" mode
And I have defined downloadable transcripts for the videos
Then I can download a transcript for Video A in "srt" format
And the Download Transcript menu does not exist for Video C'

@data(('srt', '00:00:00,260'), ('txt', 'Welcome    to    edX.'))
@unpack
def test_download_transcript_links_work_correctly(self, file_type, search_text):

    data_a = {'sub': '3_yD_cEKoCk', 'download_track': True}
    youtube_a_metadata = self.metadata_for_mode('youtube', additional_data=data_a)
    self.assets.append('subs_3_yD_cEKoCk.srt.sjson')
    data_b = {'youtube_id_1_0': 'b7xgknqkQk8', 'sub': 'b7xgknqkQk8', 'download_track': True}
    youtube_b_metadata = self.metadata_for_mode('youtube', additional_data=data_b)
    self.assets.append('subs_b7xgknqkQk8.srt.sjson')
    data_c = {'track': 'http://example.org/', 'download_track': True}
    html5_c_metadata = self.metadata_for_mode('html5', additional_data=data_c)
    self.contents_of_verticals = [[{'display_name': 'A', 'metadata': youtube_a_metadata}], [{'display_name': 'B', 'metadata': youtube_b_metadata}], [{'display_name': 'C', 'metadata': html5_c_metadata}]]
    self.navigate_to_video()
    self.assertTrue(self.video.downloaded_transcript_contains_text(file_type, search_text))
    self.courseware_page.nav.go_to_vertical('Test    Vertical-2')
    self.assertFalse(self.video.is_menu_present('download_transcript'))
