-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Alex/multiple transcripts editor #2899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,11 +2,13 @@ | |
| 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 | ||
|
|
@@ -16,16 +18,209 @@ Feature: CMS Video Component Editor | |
| 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 | ||
| Then when I view the video it does show the captions | ||
| And I see "Привіт, edX вітає вас." text in the captions | ||
|
|
||
| # 7 | ||
| Scenario: Translations downloading works correctly w/ preliminary saving | ||
| Given I have created a Video component | ||
| And I edit the component | ||
| And I open tab "Advanced" | ||
| And I upload transcript files: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before this step, it has the zh file already, right? Then this step overwrites that file? Why does this step change the default to uk? (Same question asked above)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For the newly created video module it uses a first translation from uploaded translations sorted by language code(http://loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt according to http://en.wikipedia.org/wiki/ISO_639-1) as primary. |
||
| |lang_code|filename | | ||
| |uk |uk_transcripts.srt | | ||
| |zh |chinese_transcripts.srt| | ||
| And I save changes | ||
| And I edit the component | ||
| And I open tab "Advanced" | ||
| And I see translations for "uk, zh" | ||
| And video language menu has "uk, zh" translations | ||
| Then I can download transcript for "zh" language code, that contains text "好 各位同学" | ||
| And I can download transcript for "uk" language code, that contains text "Привіт, edX вітає вас." | ||
|
|
||
| # 8 | ||
| Scenario: Translations downloading works correctly w/o preliminary saving | ||
| Given I have created a Video component | ||
| And I edit the component | ||
| And I open tab "Advanced" | ||
| And I upload transcript files: | ||
| |lang_code|filename | | ||
| |uk |uk_transcripts.srt | | ||
| |zh |chinese_transcripts.srt| | ||
| Then I can download transcript for "zh" language code, that contains text "好 各位同学" | ||
| And I can download transcript for "uk" language code, that contains text "Привіт, edX вітає вас." | ||
|
|
||
| # 9 | ||
| Scenario: Translations removing works correctly w/ preliminary saving | ||
| Given I have created a Video component | ||
| And I edit the component | ||
| And I open tab "Advanced" | ||
| And I upload transcript files: | ||
| |lang_code|filename | | ||
| |uk |uk_transcripts.srt | | ||
| |zh |chinese_transcripts.srt| | ||
| And I save changes | ||
| Then when I view the video it does show the captions | ||
| And I see "Привіт, edX вітає вас." text in the captions | ||
| And video language menu has "uk, zh" translations | ||
| And I edit the component | ||
| And I open tab "Advanced" | ||
| And I see translations for "uk, zh" | ||
| Then I remove translation 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 I edit the component | ||
| And I open tab "Advanced" | ||
| And I see translations for "zh" | ||
| Then I remove translation for "zh" language code | ||
| And I save changes | ||
| Then when I view the video it does not show the captions | ||
|
|
||
| # 10 | ||
| Scenario: Translations removing works correctly w/o preliminary saving | ||
| Given I have created a Video component | ||
| And I edit the component | ||
| And I open tab "Advanced" | ||
| And I upload transcript file "uk_transcripts.srt" for "uk" language code | ||
| And I see translations for "uk" | ||
| Then I remove translation for "uk" language code | ||
| And I save changes | ||
| Then when I view the video it does not show the captions | ||
|
|
||
| # 11 | ||
| Scenario: Translations clearing works correctly w/ preliminary saving | ||
| Given I have created a Video component | ||
| And I edit the component | ||
| And I open tab "Advanced" | ||
| And I upload transcript files: | ||
| |lang_code|filename | | ||
| |uk |uk_transcripts.srt | | ||
| |zh |chinese_transcripts.srt| | ||
| And I save changes | ||
| Then when I view the video it does show the captions | ||
| And I see "Привіт, edX вітає вас." text in the captions | ||
| And video language menu has "uk, zh" translations | ||
| And I edit the component | ||
| And I open tab "Advanced" | ||
| And I see translations for "uk, zh" | ||
| And I click button "Clear" | ||
| And I save changes | ||
| Then when I view the video it does not show the captions | ||
|
|
||
| # 12 | ||
| Scenario: Translations clearing works correctly w/o preliminary saving | ||
| Given I have created a Video component | ||
| And I edit the component | ||
| And I open tab "Advanced" | ||
| And I upload transcript files: | ||
| |lang_code|filename | | ||
| |uk |uk_transcripts.srt | | ||
| |zh |chinese_transcripts.srt| | ||
| And I click button "Clear" | ||
| And I save changes | ||
| Then when I view the video it does not show the captions | ||
|
|
||
| # 13 | ||
| Scenario: User cannot upload translations in sjson format | ||
| Given I have created a Video component | ||
| And I edit the component | ||
| And I open tab "Advanced" | ||
| And I click button "Add" | ||
| And I choose "uk" language code | ||
| And I try to upload transcript file "uk_transcripts.sjson" | ||
| Then I see validation error "Only SRT files can be uploaded. Please select a file ending in .srt to upload." | ||
|
|
||
| # 14 | ||
| Scenario: User can easy replace the translation by another one w/ preliminary saving | ||
| 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 replace transcript file for "zh" language code by "uk_transcripts.srt" | ||
| And I save changes | ||
| Then when I view the video it does show the captions | ||
| And I see "Привіт, edX вітає вас." text in the captions | ||
|
|
||
| # 15 | ||
| Scenario: User can easy replace the translation by another one w/o preliminary saving | ||
| 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 see translations for "zh" | ||
| And I replace transcript file for "zh" language code by "uk_transcripts.srt" | ||
| And I save changes | ||
| Then when I view the video it does show the captions | ||
| And I see "Привіт, edX вітає вас." text in the captions | ||
|
|
||
| # 16 | ||
| Scenario: Upload "zh" file "A" -> Remove "zh" -> Upload "zh" file "B" | ||
| 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 see translations for "zh" | ||
| Then I remove translation for "zh" language code | ||
| And I upload transcript file "uk_transcripts.srt" for "zh" language code | ||
| And I save changes | ||
| Then when I view the video it does show the captions | ||
| And I see "Привіт, edX вітає вас." text in the captions | ||
|
|
||
| # 17 | ||
| Scenario: User cannot select the same language twice | ||
| Given I have created a Video component | ||
| And I edit the component | ||
| And I open tab "Advanced" | ||
| And I click button "Add" | ||
| And I choose "zh" language code | ||
| And I click button "Add" | ||
| Then I cannot choose "zh" language code | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused as to why it defaults to uk on the double uploads below but is sticky with the existing zh here. I suppose my real question is whether the double upload tests should do something to ensure the selected language is uk or is it purely a matter of the order in the listing and is that order predictable and guaranteed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make sure that after editing previously created video module and adding new translations will not change currently used translation.
As you can see in this test, we have created video module with chinese translation and then edit this module by adding new translation.
Logic is here