Editing a group

BDD file with acceptance criteria for editing a group, describing each step of the feature and user permissions.
Feature: As a user I want to manage group members

Scenario Outline: Manage group page visibiltiy
 Given  my user role is <userRole>
 And  I got to manage group page
 Then  I will see the <contentType>

Examples:
| userRole | contentType |
| OWNER | manage group page |
| ADMIN | manage group page |
| EDITOR | manage group page |
| INTERNAL_REVIEWER | no access message |
| EXTERNAL_REVIEWER | no access message |
| EXTERNAL_EDITOR | no access message |

Scenario: Updating group name success
 Given  I update my group name successfully
 Then  this update will apply to the group

Scenario: Updating group name failure
 Given  my group name update fails
 Then  I should see visual feedback explaining there was an issue

Scenario: Update a group without a name
 Given  I submit no name for my group
 Then  I will see an error message
 And  the group name will not be updated

Scenario: Searching for users on group manage page
 Given  I search for a user or users
 Then  I will see a list of users matching the search term

Scenario: No users match search term
 Given  I search for a user or users
 And  nothing matches the search term
 Then  I will see visual feedback explaining this

Scenario: Add user or users to group success
 Given  I add a user or users to the group
 Then  they will be added to the group member list

Scenario: Add user or users to group fails
 Given  adding a user or users to the group fails
 Then  I will see visual feedback explaining there was an issue
 And  they will not be added to the group member list

Scenario Outline: Remove option available
 Given  I have <usersInGroup> in a group
 Then  I will have the <removeOption> remove them

Examples:
| usersInGroup | removeOption |
| the group owner | no option to |
| other group members | the option to |

Scenario: Removing a group member success
 Given  I remove a group member successfully
 Then  they will be removed from the group list

Scenario: Removing a group member fails
 Given  removing a group member fails
 Then  I will see visual feedback explaining there was an issue
 And  they will remain in the group list