Skip to content
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

Production into unstable #3159

Merged
merged 12 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contentcuration/contentcuration/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ def filter_view_queryset(cls, queryset, user):
view=view,
)

if user.is_admin:
if user_id and user.is_admin:
return queryset

permission_filter = Q()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1212,5 +1212,6 @@
"ForgotPassword.forgotPasswordFailed": "فشلت عملية إرسال رابط تفعيل جديد. يرجى المحاولة مجدداً.",
"AdministrationAppError.unauthorizedDetails": "يجب أن تكون مسؤولاً في الاستوديو لتتمكن من عرض هذه الصفحة",
"AdministrationIndex.channelsLabel": "القنوات",
"AdministrationIndex.usersLabel": "المستخدمون"
"AdministrationIndex.usersLabel": "المستخدمون",
"InfoModal.close": "إغلاق"
}
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@
"ImportFromChannelsModal.addButton": "Añadir",
"ImportFromChannelsModal.addedText": "Añadido",
"ImportFromChannelsModal.removeButton": "Eliminar",
"InfoModal.close": "Cerrar",
"EditSearchModal.editSavedSearchTitle": "Editar título de búsqueda",
"EditSearchModal.searchTitleLabel": "Título de búsqueda",
"EditSearchModal.cancelAction": "Cancelar",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@
"ImportFromChannelsModal.addButton": "Ajouter",
"ImportFromChannelsModal.addedText": "Ajoutée",
"ImportFromChannelsModal.removeButton": "Supprimer",
"InfoModal.close": "Fermer",
"EditSearchModal.editSavedSearchTitle": "Modifier le titre de la recherche",
"EditSearchModal.searchTitleLabel": "Titre de la recherche",
"EditSearchModal.cancelAction": "Annuler",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@
"ImportFromChannelsModal.addButton": "Add",
"ImportFromChannelsModal.addedText": "Added",
"ImportFromChannelsModal.removeButton": "Remove",
"InfoModal.close": "बंद (close)",
"EditSearchModal.editSavedSearchTitle": "Edit search title",
"EditSearchModal.searchTitleLabel": "Search title",
"EditSearchModal.cancelAction": "Cancel",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@
"ImportFromChannelsModal.addButton": "Add",
"ImportFromChannelsModal.addedText": "Added",
"ImportFromChannelsModal.removeButton": "Remove",
"InfoModal.close": "Fechar",
"EditSearchModal.editSavedSearchTitle": "Edit search title",
"EditSearchModal.searchTitleLabel": "Search title",
"EditSearchModal.cancelAction": "Cancel",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@
"ImportFromChannelsModal.resourcesSelected": "{count, number} {count, plural, zero {} one {مصدر تم تحديده} two {مصدران تم تحديدهما} few {مصادر تم تحديدها} many {مصدراً تم تحديده} other {مصادر تم تحديدها}}",
"ImportFromChannelsModal.reviewAction": "مراجعة",
"ImportFromChannelsModal.reviewTitle": "تحديد المصدر",
"InfoModal.close": "إغلاق",
"LanguageDropdown.labelText": "اللغة",
"LanguageDropdown.languageItemText": "{language} ({code})",
"LanguageDropdown.languageRequired": "هذا الحقل مطلوب",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@
"ImportFromChannelsModal.resourcesSelected": "{count, number} {count, plural, one {recurso seleccionado} other {recursos seleccionados}}",
"ImportFromChannelsModal.reviewAction": "Revisar",
"ImportFromChannelsModal.reviewTitle": "Selección de recursos",
"InfoModal.close": "Cerrar",
"LanguageDropdown.labelText": "Idioma",
"LanguageDropdown.languageItemText": "{language} ({code})",
"LanguageDropdown.languageRequired": "Este campo es obligatorio",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@
"ImportFromChannelsModal.resourcesSelected": "{count, number} {count, plural, one {ressource sélectionnée} other {ressources sélectionnées}}",
"ImportFromChannelsModal.reviewAction": "Passer en revue",
"ImportFromChannelsModal.reviewTitle": "Sélection de ressources",
"InfoModal.close": "Fermer",
"LanguageDropdown.labelText": "Langue",
"LanguageDropdown.languageItemText": "{language} ({code})",
"LanguageDropdown.languageRequired": "Ce champ est obligatoire",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@
"ImportFromChannelsModal.resourcesSelected": "{count, number} {count, plural, one {resource selected} other {resources selected}}",
"ImportFromChannelsModal.reviewAction": "Review",
"ImportFromChannelsModal.reviewTitle": "Resource selection",
"InfoModal.close": "बंद (close)",
"LanguageDropdown.labelText": "भाषा ",
"LanguageDropdown.languageItemText": "{language} ({code})",
"LanguageDropdown.languageRequired": "Field is required",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@
"ImportFromChannelsModal.resourcesSelected": "{count, number} {count, plural, one {resource selected} other {resources selected}}",
"ImportFromChannelsModal.reviewAction": "Review",
"ImportFromChannelsModal.reviewTitle": "Resource selection",
"InfoModal.close": "Fechar",
"LanguageDropdown.labelText": "Idioma",
"LanguageDropdown.languageItemText": "{language} ({code})",
"LanguageDropdown.languageRequired": "Field is required",
Expand Down
93 changes: 83 additions & 10 deletions integration_testing/features/sync-channel.feature
Original file line number Diff line number Diff line change
@@ -1,15 +1,88 @@
Feature: Sync channel
Feature: Sync resources
Studio users need to be able to sync and update the resources in their channels that have been imported from other channels, but have been modified since the original import.

Background:
Given I am signed in to Studio as a non-admin user
And I am in the channel editor page
When I click on the ellipsis button in the top-right corner
And I click on the *Sync channel* menu option
Then a *Sync resources* modal appears
Given I am signed in to Studio
And I am on the <channel_a> editor page
And there is a <resource> in the <channel_a> that has been imported from <channel_b>

Scenario: Sync channel
When I make sync selections via the checkboxes
Scenario: Sync resource file information
Given there is new version of the <resource> file in the <channel_b>
Or the thumbnail has been added to the <resource> file in the <channel_b>
When I click on the *···* button in the top-right corner
And I select the *Sync channel* option
Then I see *Sync resources* modal window
When I activate the *File* checkbox
And click the *Continue* button
Then a modal appears to confirm my sync choices
Then I see the *Confirm sync* modal
When I click *Sync*
Then a progress bar appears
Then I see the *Syncing channel* modal
And I see the progress bar
When I see the *Operation complete!* message
And I click the *Refresh button*
Then I see the new file version of the <resource>
Or I see the new thumbnail

Scenario: Sync resource tags
Given the <resource> in the <channel_b> has a new tag
When I click on the *···* button in the top-right corner
And I select the *Sync channel* option
Then I see *Sync resources* modal window
When I activate the *Tags* checkbox
And click the *Continue* button
Then I see the *Confirm sync* modal
When I click *Sync*
Then I see the *Syncing channel* modal
And I see the progress bar
When I see the *Operation complete!* message
And I click the *Refresh button*
Then I see the new tag of the <resource>

Scenario: Sync resource title and description
Given the <resource> in the <channel_b> has a new title and description
When I click on the *···* button in the top-right corner
And I select the *Sync channel* option
Then I see *Sync resources* modal window
When I activate the *Titles and descriptions* checkbox
And click the *Continue* button
Then I see the *Confirm sync* modal
When I click *Sync*
Then I see the *Syncing channel* modal
And I see the progress bar
When I see the *Operation complete!* message
And I click the *Refresh button*
Then I see the new title and description of the <resource>

Scenario: Sync assessment resource details
Given the <resource> is an assessment type (exercise)
And it has new questions, answers or hints in the <channel_b>
When I click on the *···* button in the top-right corner
And I select the *Sync channel* option
Then I see *Sync resources* modal window
When I activate the *Assessment details* checkbox
And click the *Continue* button
Then I see the *Confirm sync* modal
When I click *Sync*
Then I see the *Syncing channel* modal
And I see the progress bar
When I see the *Operation complete!* message
And I click the *Refresh button*
Then I see the new questions, answers or hints in the <resource>

Scenario: Edited resource metadata is reverted after syncing
Given I have edited some <resource> metadata (title, description or tags) after importing from <channel_b>
When I click on the *···* button in the top-right corner
And I select the *Sync channel* option
Then I see *Sync resources* modal window
When I activate the *Tags* or *Titles and descriptions* checkbox
And click the *Continue* button
Then I see the *Confirm sync* modal
When I click *Sync*
Then I see the *Syncing channel* modal
And I see a progress bar
When I see the *Operation complete!* message
And I click the *Refresh button*
Then I see that my edits of title, description or tags for the <resource> have been reverted to reflect those on the <channel_b>

Examples:
| channel_a | channel_b | resource |