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

Bulk editing gherkin scenarios #4784

Merged
merged 1 commit into from
Oct 10, 2024
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
Feature: Modal for applying inheritable metadata

Background:
Given I am signed in to Studio
And I am at the channel editor page
And there is a folder named *Folder 1* with language, categories, level, and requirements
And there is a second folder named *Folder 2* with different metadata

Scenario: Upload resources into a folder and see the modal
When I upload a resource into *Folder 1*
Then I see the *Apply details from the folder 'Folder 1'* modal
And I see the *Select details to add*, *Update language* and *Don't ask me about this folder again* sections
And I see all checkboxes checked except for *Don't ask me about this folder again*
When I click *Continue*
Then I see the *Edit files* modal
And I see that all the selected metadata is applied

Scenario: Upload multiple resources to a folder with metadata
When I upload several resources into *Folder 1*
Then I see the *Apply details from the folder 'Folder 1'* modal
And I see the *Select details to add*, *Update language* and *Don't ask me about this folder again* sections
And I see all checkboxes checked except for *Don't ask me about this folder again*
And in the background I see that all of the resources are selected in the left sidebar
When I click *Continue*
Then I see the *Edit files* modal
And I see that only the first file is selected in the left sidebar
And I see that all the previously selected metadata is applied to all of the uploaded resources

Scenario: Move resource and prompt for metadata
Given *Folder 1* contains a resource
And *Folder 2* exists with different metadata
When I move the resource from *Folder 1* to *Folder 2*
Then I see the *Apply details from the folder 'Folder 2'* modal
And I see all checkboxes checked except for *Don't ask me about this folder again*
When I click *Continue*
Then I see the *Edit files* modal
And I see that all the selected metadata is applied

Scenario: Copy a resource to clipboard, and move it into a new folder
Given *Folder 1* contains a resource
When I copy it to the clipboard
And I move it from the clipboard to *Folder 2*
Then I see the *Apply details from the folder 'Folder 2'* modal
And I see all checkboxes checked except for *Don't ask me about this folder again*
When I click *Continue*
Then I see the *Moved to 'Folder 2'* snackbar message

Scenario: Move a resource into a folder with no metadata
Given I have created a folder named *Folder 3* with no metadata
When I move a resource into *Folder 3*
Then the modal for applying inheritable metadata is not displayed

Scenario: Import a resource into a folder with metadata
When I import a resource into *Folder 1*
Then the modal for applying inheritable metadata is displayed
When I click *Continue*
Then I see that the resource is imported into *Folder 1*
And I see that all the selected metadata is applied

Scenario: Import a resource into a folder with no metadata
Given I have created a folder named *Folder 3* with no metadata
When I import a resource into *Folder 3*
Then the modal for applying inheritable metadata is not displayed

Scenario: Move or import a resource in a folder that has only a language tagged
Given there is a folder that has only a language tagged
When I move or import a resource to that folder
Then I see the *Apply details from the folder* modal
And I see that only the *Update language* checkbox is checked

Scenario: Move or import a resource in a folder that has only categories tagged
Given there is a folder that has only categories tagged
When I move or import a resource to that folder
Then I see the *Apply details from the folder* modal
And I see that only the *Select details to add* section is visible

Scenario: Select the *Don't ask me about this folder again* checkbox
Given I am at the *Apply details from the folder* modal
When I select the *Don't ask me about this folder again* checkbox
And I click *Continue*
Then I see the *Edit files* modal
And I see that all the selected metadata is applied
When I close the *Edit files* modal
And I upload another resource to the same folder
Then I no longer see the *Apply details from the folder* modal
And I see that the previously selected details are applied by default to the resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
Feature: Quick edit fields of multiple resources

Background:
Given I am signed in to Studio
And I am at the channel editor page
And there are available resources of different types

Scenario: Edit the language of multiple resources with the same language or no predefined language
When I select at least two resources
And I click the *Edit language* icon
Then I see the *Edit language* modal
When I select a new language
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the language of multiple resources with the different languages
When I select at least two resources
And I click the *Edit language* icon
Then I see the *Edit language* modal
And I see *You selected resources in different languages. The language you choose below will be applied to all selected resources.*
When I select a new language
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the categories of multiple resources with the same categories or no predefined categories
When I select at least two resources
And I click the *Edit categories* icon
Then I see the *Edit categories* modal
When I select one or several new categories
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the categories of multiple resources with different categories
When I select at least two resources
And I click the *Edit categories* icon
Then I see the *Edit categories* modal
And I see *You selected resources that have different categories. The categories you choose below will be added to all selected resources. This will not remove existing categories.*
And I see that all checkboxes are unchecked
When I select one or several new categories
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the levels of multiple resources with the same levels or no predefined levels
When I select at least two resources
And I click the *Edit levels* icon
Then I see the *Edit levels* modal
When I select one or several levels
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the levels of multiple resources with different levels
When I select at least two resources
And I click the *Edit levels* icon
Then I see the *Edit levels* modal
And I see *You selected resources that have different categories. The categories you choose below will be added to all selected resources. This will not remove existing categories.*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😁

And I see that all checkboxes are unchecked
When I select one or several levels
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the learning activities of multiple resources with the same learning activities or no predefined activities
When I select at least two resources
And I click the *Edit learning activity* icon
Then I see the *Edit learning activities* modal
When I select one or several activities
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the learning activities of multiple resources with different learning activities
When I select at least two resources
And I click the *Edit learning activity* icon
Then I see the *Edit learning activities* modal
And I see *You selected resources that have different categories. The categories you choose below will be added to all selected resources. This will not remove existing categories.*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙃

And I see that all checkboxes are unchecked
When I select one or several activities
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the source of multiple resources with the same source or no predefined source
When I select at least two resources
And I click the *Edit source* icon
Then I see the *Edit source* modal
When I fill in the *Author*, *Provider*, *Aggregator*, *License*, *License description* and *Copyright holder* fields
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the source of multiple resources with different source
When I select at least two resources
And I click the *Edit source* icon
Then I see the *Edit source* modal
And I see *Mixed* in each field with different source
When I fill in the *Author*, *Provider*, *Aggregator*, *License*, *License description* and *Copyright holder* fields
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the audience of multiple resources with the same audience or no predefined audience
When I select at least two resources
And I click the *Edit audience* icon
Then I see the *Edit audience* modal
When I select one of the available *Visible to* options, such as *Coaches* or *Anyone*
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the audience of multiple resources with different audience
When I select at least two resources
And I click the *Edit audience* icon
Then I see the *Edit audience* modal
And I see *The selected resources are visible to different audiences. Choosing an option below will change the visibility of all selected resources.*
And I see both *Coaches* and *Anyone* checkboxes are unchecked
When I select one of the available options
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the requirements section of multiple resources with the same values selected or no predefined values
When I select at least two resources
And I click the *Edit requirements* icon
Then I see the *Edit requirements* modal
When I select one or several of the available options
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the requirements section of multiple resources with different values set
When I select at least two resources
And I click the *Edit requirements* icon
Then I see the *Edit requirements* modal
And I see *You selected resources that have different categories. The categories you choose below will be added to all selected resources. This will not remove existing categories.*
And I see that all checkboxes are unchecked
When I select one or several of the available options
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Disabled icons when bulk editing both folders and resources
When I select a folder and a resource
Then I see the following icons disabled in the top bar: *Edit learning activity*, *Edit source*, *Edit audience*

Scenario: Hidden icons when bulk editing only folders
When I select at least two folders
Then I the following icons are not being displayed in the top bar: *Edit learning activity*, *Edit source*, *Edit audience*
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
Feature: Quick edit fields of a single resource

Background:
Given I am signed in to Studio
And I am at the channel editor page
And there are available resources of different types

Scenario: Edit the title and description of a resource
When I click the *⋮* (Options) button for a resource
And I click the *Edit title and description* option
Then I see the *Edit title and description* modal
When I enter a new title and description
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*
And I can see that the title and description are changed

Scenario: Edit the language of a resource
When I click the *⋮* (Options) button for a resource #alternatively one can select a resource and click the corresponding icon in the top bar
And I click the *Edit language* option
Then I see the *Edit language* modal
When I select a new language
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the categories of a resource
When I click the *⋮* (Options) button for a resource #alternatively one can select a resource and click the corresponding icon in the top bar
And I click the *Edit categories* option
Then I see the *Edit categories* modal
When I select one or several new categories
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the levels of a resource
When I click the *⋮* (Options) button for a resource #alternatively one can select a resource and click the corresponding icon in the top bar
And I click the *Edit levels* option
Then I see the *What levels* modal
When I select one or several levels
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the learning activities of a resource
When I click the *⋮* (Options) button for a resource #alternatively one can select a resource and click the corresponding icon in the top bar
And I click the *Edit learning activities* option
Then I see the *Edit learning activities* modal
When I select one or several activities
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the source of a resource
When I click the *⋮* (Options) button for a resource #alternatively one can select a resource and click the corresponding icon in the top bar
And I click the *Edit source* option
Then I see the *Edit source* modal
When I fill in the desired fields
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the audience of a resource
When I click the *⋮* (Options) button for a resource #alternatively one can select a resource and click the corresponding icon in the top bar
And I click the *Edit audience* option
Then I see the *Edit audience* modal
When I select the desired options
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the completion criteria of a resource
When I click the *⋮* (Options) button for a resource #alternatively one can select a resource and click the corresponding icon in the top bar
And I click the *Edit completion* option
Then I see the *Edit completion* modal
When I select the desired options
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*

Scenario: Edit the requirements of a resource
When I click the *⋮* (Options) button for a resource #alternatively one can select a resource and click the corresponding icon in the top bar
And I click the *Edit requirements* option
Then I see the *Edit requirements* modal
When I select the desired options
And I click the *Save* button
Then I am back at the page with the resources
And I see a message: *Changes saved*