diff --git a/tests/features/bootstrap/FeatureContext.php b/tests/features/bootstrap/FeatureContext.php index a49e906fde..dcf7ac6a01 100644 --- a/tests/features/bootstrap/FeatureContext.php +++ b/tests/features/bootstrap/FeatureContext.php @@ -305,4 +305,26 @@ class FeatureContext extends MinkContext new Step\When('I press "submit"') ]; } + + /** + * @Given /^I am on the social group members page with id "([^"]*)"$/ + */ + public function iAmOnSocialGroupMembersPageWithId($groupId) + { + return [ + new Step\Given('I am on "/main/social/group_view.php?id=' . $groupId . '"') + ]; + } + + /** + * @When /^I try delete a friend with id "([^"]*)" from the social group with id "([^"]*)"$/ + */ + public function iTryDeleteAFriendFromSocialGroup($friendId, $groupId) + { + return [ + new Step\When( + 'I am on "/main/social/group_members.php?id=' . $groupId . '&u=' . $friendId . '&action=delete"' + ) + ]; + } } diff --git a/tests/features/socialGroup.feature b/tests/features/socialGroup.feature index 17d28743c9..930c6d8562 100644 --- a/tests/features/socialGroup.feature +++ b/tests/features/socialGroup.feature @@ -32,3 +32,8 @@ Feature: Social Group And I am on "/main/social/invitations.php" And I follow "deny-invitation-1" Then I should see "Group invitation was denied" + + Scenario: Delete user from group + Given I am a platform administrator + When I try delete a friend with id "11" from the social group with id "1" + Then I should see "The user has been deleted"