'Scenario: Video with existing subs - Advanced tab - change to another one subs -
Basic tab - Found message - Save - see correct subs
Given I have created a Video component with subtitles "t_not_exist"
After I enter a "video_name_1.mp4" source to field number 1 I see status message "No Timed Transcript"
After uploading the transcripts "chinese_transcripts.srt" I see message "Timed Transcript Uploaded Successfully"
After saving the changes video captions should be visible
And I see "å¥œ åäœåå­Š" text in the captions
And I edit the component
Open tab "Advanced" And set value "t_not_exist" to the field "Default Timed Transcript"
When I open tab "Basic" I should see status message "Timed Transcript Found"
After saving the changes video captions should be visible
And I see "LILA FISHER: Hi, welcome to Edx." text in the captions'

def test_video_w_existing_subtitles(self):

    self._create_video_component(subtitles=True, subtitle_id='t_not_exist')
    self.edit_component()
    self.video.set_url_field('video_name_1.mp4', 1)
    self.assertEqual(self.video.message('status'), 'No    Timed    Transcript')
    self.video.upload_transcript('chinese_transcripts.srt')
    self.assertEqual(self.video.message('status'), 'Timed    Transcript    Uploaded    Successfully')
    self.save_unit_settings()
    self.assertTrue(self.video.is_captions_visible())
    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)
    self.edit_component()
    self.open_advanced_tab()
    self.video.set_field_value('Default    Timed    Transcript', 't_not_exist')
    self.open_basic_tab()
    self.assertEqual(self.video.message('status'), 'Timed    Transcript    Found')
    self.save_unit_settings()
    self.assertTrue(self.video.is_captions_visible())
    self.assertIn('LILA    FISHER:    Hi,    welcome    to    Edx.', self.video.captions_text)
