<commit_before>@shard_3
Feature: CMS Video Component Editor
  As a course author, I want to be able to create video components

  # 1
  Scenario: User can view Video metadata
    Given I have created a Video component
    And I edit the component
    Then I see the correct video settings and default values

  # 2
  # Safari has trouble saving values on Sauce
  @skip_safari
  Scenario: User can modify Video display name
    Given I have created a Video component
    And I edit the component
    And I open tab "Advanced"
    Then I can modify the display name
    And my video display name change is persisted on save

  # 3
  # Sauce Labs cannot delete cookies
  @skip_sauce
  Scenario: Captions are hidden when "transcript display" is false
    Given I have created a Video component with subtitles
    And I have set "transcript display" to False
    Then when I view the video it does not show the captions

  # 4
  # Sauce Labs cannot delete cookies
  @skip_sauce
  Scenario: Captions are shown when "transcript display" is true
    Given I have created a Video component with subtitles
    And I have set "transcript display" to True
    Then when I view the video it does show the captions

  # 5
  Scenario: Translations uploading works correctly
    Given I have created a Video component
    And I edit the component
    And I open tab "Advanced"
    And I upload transcript file "chinese_transcripts.srt" for "zh" language code
    And I save changes
    Then when I view the video it does show the captions
    And I see "好 各位同学" text in the captions
    And I edit the component
    And I open tab "Advanced"
    And I see translations for "zh"
    And I upload transcript file "uk_transcripts.srt" for "uk" language code
    And I save changes
    Then when I view the video it does show the captions
    And I see "好 各位同学" text in the captions
    And video language menu has "uk, zh" translations

  # 6
  Scenario: User can upload transcript file with > 1mb size
    Given I have created a Video component
    And I edit the component
    And I open tab "Advanced"
    And I upload transcript file "1mb_transcripts.srt" for "uk" language code
    And I save changes<commit_msg>Wait for big subtitles to render.<commit_after>@shard_3
Feature: CMS Video Component Editor
  As a course author, I want to be able to create video components

  # 1
  Scenario: User can view Video metadata
    Given I have created a Video component
    And I edit the component
    Then I see the correct video settings and default values

  # 2
  # Safari has trouble saving values on Sauce
  @skip_safari
  Scenario: User can modify Video display name
    Given I have created a Video component
    And I edit the component
    And I open tab "Advanced"
    Then I can modify the display name
    And my video display name change is persisted on save

  # 3
  # Sauce Labs cannot delete cookies
  @skip_sauce
  Scenario: Captions are hidden when "transcript display" is false
    Given I have created a Video component with subtitles
    And I have set "transcript display" to False
    Then when I view the video it does not show the captions

  # 4
  # Sauce Labs cannot delete cookies
  @skip_sauce
  Scenario: Captions are shown when "transcript display" is true
    Given I have created a Video component with subtitles
    And I have set "transcript display" to True
    Then when I view the video it does show the captions

  # 5
  Scenario: Translations uploading works correctly
    Given I have created a Video component
    And I edit the component
    And I open tab "Advanced"
    And I upload transcript file "chinese_transcripts.srt" for "zh" language code
    And I save changes
    Then when I view the video it does show the captions
    And I see "好 各位同学" text in the captions
    And I edit the component
    And I open tab "Advanced"
    And I see translations for "zh"
    And I upload transcript file "uk_transcripts.srt" for "uk" language code
    And I save changes
    Then when I view the video it does show the captions
    And I see "好 各位同学" text in the captions
    And video language menu has "uk, zh" translations

  # 6
  Scenario: User can upload transcript file with > 1mb size
    Given I have created a Video component
    And I edit the component
    And I open tab "Advanced"
    And I upload transcript file "1mb_transcripts.srt" for "uk" language code
    And I save changes
    And I wait for "10" seconds
{'fraction_non_alphanumeric': 0.02990107913669065, 'fraction_numerical': 0.0044964028776978415, 'mean_word_length': 3.092916283348666, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5560369', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1183, 'n_words': 700}