transcripts.feature 3.97 KB
Newer Older
1
@shard_3 @requires_stub_youtube
2 3
Feature: CMS Transcripts
  As a course author, I want to be able to create video components
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

    # For transcripts acceptance tests there are 3 available caption
    # files. They can be used to test various transcripts features. Two of
    # them can be imported from YouTube.
    #
    # The length of each file name is 11 characters. This is because the
    # YouTube's ID length is 11 characters. If file name is not of length 11,
    # front-end validation will not pass.
    #
    #     t__eq_exist - this file exists on YouTube, and can be imported
    #                   via the transcripts menu; after import, this file will
    #                   be equal to the one stored locally
    #     t_neq_exist - same as above, except local file will differ from the
    #                   one stored on YouTube
    #     t_not_exist - this file does not exist on YouTube; it exists locally

    #3
    Scenario: Youtube id only: check "not found" and "import" states
        Given I have created a Video component with subtitles
        And I edit the component

        # Not found: w/o local or server subs
        And I remove "t_not_exist" transcripts id from store
        And I enter a "http://youtu.be/t_not_exist" source to field number 1
        Then I see status message "not found"
polesye committed
29
        And I see value "" in the field "Default Timed Transcript"
30 31 32 33

        # Import: w/o local but with server subs
        And I remove "t__eq_exist" transcripts id from store
        And I enter a "http://youtu.be/t__eq_exist" source to field number 1
polesye committed
34
        Then I see status message "not found on edx"
35
        And I see button "import"
36
        And I click transcript button "import"
37 38 39
        Then I see status message "found"
        And I see button "upload_new_timed_transcripts"
        And I see button "download_to_edit"
polesye committed
40
        And I see value "t__eq_exist" in the field "Default Timed Transcript"
41 42


Will Daly committed
43
    # Disabled 1/29/14 due to flakiness observed in master
44
    #10
Will Daly committed
45 46 47 48 49
    #Scenario: User sets youtube_id w/o local but with server subs and one html5 link w/o subs
    #    Given I have created a Video component
    #    And I edit the component
    #
    #    And I enter a "http://youtu.be/t__eq_exist" source to field number 1
polesye committed
50
    #    Then I see status message "not found on edx"
Will Daly committed
51 52 53 54 55 56
    #    And I see button "import"
    #    And I click transcript button "import"
    #    Then I see status message "found"
    #
    #    And I enter a "t_not_exist.mp4" source to field number 2
    #    Then I see status message "found"
polesye committed
57
    #    And I see value "t__eq_exist" in the field "Default Timed Transcript"
58

59
    # Flaky test fails occasionally in master. https://openedx.atlassian.net/browse/BLD-892
60
    #21
61 62 63 64 65 66 67 68
    #Scenario: Work with 1 field only: Enter HTML5 source with transcripts - save - > change it to another one HTML5 source w/o #transcripts - click on use existing - >  change it to another one HTML5 source w/o transcripts - click on use existing
    #    Given I have created a Video component with subtitles "t_not_exist"
    #    And I edit the component
    #
    #    And I enter a "t_not_exist.mp4" source to field number 1
    #    Then I see status message "found"
    #    And I see button "download_to_edit"
    #    And I see button "upload_new_timed_transcripts"
polesye committed
69
    #    And I see value "t_not_exist" in the field "Default Timed Transcript"
70 71 72 73 74 75 76 77
    #
    #    And I save changes
    #    And I edit the component
    #
    #    And I enter a "video_name_2.mp4" source to field number 1
    #    Then I see status message "use existing"
    #    And I see button "use_existing"
    #    And I click transcript button "use_existing"
polesye committed
78
    #    And I see value "video_name_2" in the field "Default Timed Transcript"
79 80 81 82 83
    #
    #    And I enter a "video_name_3.mp4" source to field number 1
    #    Then I see status message "use existing"
    #    And I see button "use_existing"
    #    And I click transcript button "use_existing"
polesye committed
84
    #    And I see value "video_name_3" in the field "Default Timed Transcript"