'Scenario: Download button works correctly for multiple transcript languages
Given the course has a Video component in "Youtube" mode
And I have defined a downloadable non-english transcript for the video
And I have defined english subtitles for the video
Then I see the correct english text in the captions
And the english transcript downloads correctly
And I see the correct non-english text in the captions
And the non-english transcript downloads correctly'

def test_download_button_two_transcript_languages(self):

    self.assets.extend(['chinese_transcripts.srt', 'subs_3_yD_cEKoCk.srt.sjson'])
    data = {'download_track': True, 'transcripts': {'zh': 'chinese_transcripts.srt'}, 'sub': '3_yD_cEKoCk'}
    self.metadata = self.metadata_for_mode('youtube', additional_data=data)
    self.navigate_to_video()
    self.assertIn('Welcome    to    edX.', self.video.captions_text)
    self.assertTrue(self.video.downloaded_transcript_contains_text('srt', 'Welcome    to    edX.'))
    self.assertTrue(self.video.select_language('zh'))
    unicode_text = '\xe5\xa5\xbd    \xe5\x90\x84\xe4\xbd\x8d\xe5\x90\x8c\xe5\xad\xa6'.decode('utf-8')
    self.assertIn(unicode_text, self.video.captions_text)
    unicode_text = '\xe5\xa5\xbd    \xe5\x90\x84\xe4\xbd\x8d\xe5\x90\x8c\xe5\xad\xa6'.decode('utf-8')
    self.assertTrue(self.video.downloaded_transcript_contains_text('srt', unicode_text))
