@javascript @core @core_view
Feature: Edit and delete Forum nbuttons are not displayed for normal users
As a normal user and not the author
I should not be able to see edit and delete buttons
because I do not have permissions
Background:
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuhipa1 | <email address hidden> | Angela | User | mahara | internal | member |
| UserB | Kupuhipa1 | <email address hidden> | Bob | 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 | UserA, UserB | UserA |
| GroupB | UserB | GroupB owned by UserB | standard | ON | ON | all | ON | ON | UserB, UserA | UserB |
Scenario: Normal members should not see edit/delete forum buttons
Given I log in as "UserA" with password "Kupuhipa1"
And I am on "/group/view.php?id=1"
When I follow "Forums"
# The following line does not run
Then I should see "Forums | Group A"
And I should not see "Edit \"General discussion\""
And I should not see "Delete \"General discussion\""
Scenario: Group owner should see edit/delete forum buttons
Given I log in as "UserB" with password "Kupuhipa1"
And I am on "/group/view.php?id=2"
When I follow "Forums"
# The following line does not run
Then I should see "Forums | Group B"
And I should see "Edit \"General discussion\""
And I should see "Delete \"General discussion\""
Manually ran the following Behat test:
@javascript @core @core_view
Feature: Edit and delete Forum nbuttons are not displayed for normal users
As a normal user and not the author
I should not be able to see edit and delete buttons
because I do not have permissions
Background:
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuhipa1 | <email address hidden> | Angela | User | mahara | internal | member |
| UserB | Kupuhipa1 | <email address hidden> | Bob | 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 | UserA, UserB | UserA |
| GroupB | UserB | GroupB owned by UserB | standard | ON | ON | all | ON | ON | UserB, UserA | UserB |
Scenario: Normal members should not see edit/delete forum buttons view.php? id=1"
Given I log in as "UserA" with password "Kupuhipa1"
And I am on "/group/
When I follow "Forums"
# The following line does not run
Then I should see "Forums | Group A"
And I should not see "Edit \"General discussion\""
And I should not see "Delete \"General discussion\""
Scenario: Group owner should see edit/delete forum buttons view.php? id=2"
Given I log in as "UserB" with password "Kupuhipa1"
And I am on "/group/
When I follow "Forums"
# The following line does not run
Then I should see "Forums | Group B"
And I should see "Edit \"General discussion\""
And I should see "Delete \"General discussion\""
Catalyst QA Approved ✔