Commit 6adfcf48 authored by Steven Spinelli's avatar Steven Spinelli Committed by Rebecca Blundell
Browse files

Bug-1788705 Summary: Group forums should not be editable to regular members,...

Bug-1788705 Summary: Group forums should not be editable to regular members, only group owner and staff

1. Group owner and staff should see edit and delete on group forums page
2. regular group member should not see edit and delete
on group forums page
3. All users should be able to see subscribe/Unsubscribe buttons
on group forums page (dependant if user is subscribed or not)

Bob can you make this code apart of Rebecca's patch # 9086

Change-Id: Ic324d0a5839c9fa7107b6f87c5b8aa8745365fd1
parent f68635ec
......@@ -3,21 +3,50 @@ Feature: Mahara users can participate in groups
As a mahara user
I need to participate in groups
Background:
Background:
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuh1pa! | UserA@example.org | Angela | User | mahara | internal | member |
| UserB | Kupuh1pa! | UserB@example.org | Bob | User | mahara | internal | member |
| UserC | Kupuh1pa! | UserC@example.org | Cecilia | User | mahara | internal | member |
| UserD | Kupuh1pa! | UserD@example.org | Dmitri | User | mahara | internal | member |
| UserE | Kupuh1pa! | UserE@example.org | Evonne | User | mahara | internal | member |
| username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuh1pa! | UserA@example.org | Angela | User | mahara | internal | member |
| UserB | Kupuh1pa! | UserB@example.org | Bob | User | mahara | internal | member |
| UserC | Kupuh1pa! | UserC@example.org | Cecilia | User | mahara | internal | member |
| UserD | Kupuh1pa! | UserD@example.org | Dmitri | User | mahara | internal | member |
| UserE | Kupuh1pa! | UserE@example.org | Evonne | User | mahara | internal | member |
And the following "groups" exist:
| name | owner | description | grouptype | open | invitefriends | editroles | submittableto | allowarchives | members | staff |
| GroupA | UserA | GroupA owned by UserA | standard | ON | ON | all | ON | ON | UserB, UserC | UserD |
Scenario: Join a group
| name | owner | description | grouptype | open | invitefriends | editroles | submittableto | allowarchives | members | staff |
| GroupA | UserA | GroupA owned by UserA | standard | ON | ON | all | ON | ON | UserB, UserC | UserD |
Scenario: Join a group
Given I log in as "UserE" with password "Kupuh1pa!"
And I choose "Find groups" in "Groups" from main menu
When I click on "GroupA"
Then I should see "About"
When I press "Join this group"
Then I should see "You are now a group member."
Scenario: Group owner sets up forum
Given I log in as "UserA" with password "Kupuh1pa!"
And I follow "GroupA"
And I follow "Forums (tab)"
And I click on "New forum"
And I fill in the following:
| Title | My new forum title |
And I fill in "My new forum description" in first editor
When I press "Save"
Then I should see "Edit forum"
And I should see "Delete forum"
Scenario: Verify group Staff can see Edit forum or Delete forum
Given I log in as "UserD" with password "Kupuh1pa!"
And I follow "GroupA"
And I follow "Forums (tab)"
Then I should see "Unsubscribe" in the "General discussion" row
And I should see 'Edit "General discussion"' in the "General discussion" row
And I should see 'Delete "General discussion"' in the "General discussion" row
Scenario: Verify group member can not see Edit forum or Delete forum only New topic and Unsubscribe from forum
Given I log in as "UserB" with password "Kupuh1pa!"
And I follow "GroupA"
And I follow "Forums (tab)"
Then I should see "Unsubscribe" in the "General discussion" row
And I should not see 'Edit "General discussion"' in the "General discussion" row
And I should not see 'Delete "General discussion"' in the "General discussion" row
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment