'Scenario: Download button works correctly w/o english transcript in HTML5 mode
Given the course has a Video component in "HTML5" mode
And I have defined a downloadable non-english transcript for the video
And I have uploaded a non-english transcript file to assets
Then I see the correct non-english text in the captions
And the non-english transcript downloads correctly'

def test_download_button_wo_english_transcript(self):

    data = {'download_track': True, 'transcripts': {'zh': 'chinese_transcripts.srt'}}
    self.metadata = self.metadata_for_mode('html5', additional_data=data)
    self.assets.append('chinese_transcripts.srt')
    self.navigate_to_video()
    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))
