Skip to content

Commit ffa1de8

Browse files
committed
Add Behat test for delete user from social group
1 parent 6eb6594 commit ffa1de8

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

tests/features/bootstrap/FeatureContext.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,4 +305,26 @@ public function adminTopBarIsEnabled()
305305
new Step\When('I press "submit"')
306306
];
307307
}
308+
309+
/**
310+
* @Given /^I am on the social group members page with id "([^"]*)"$/
311+
*/
312+
public function iAmOnSocialGroupMembersPageWithId($groupId)
313+
{
314+
return [
315+
new Step\Given('I am on "/main/social/group_view.php?id=' . $groupId . '"')
316+
];
317+
}
318+
319+
/**
320+
* @When /^I try delete a friend with id "([^"]*)" from the social group with id "([^"]*)"$/
321+
*/
322+
public function iTryDeleteAFriendFromSocialGroup($friendId, $groupId)
323+
{
324+
return [
325+
new Step\When(
326+
'I am on "/main/social/group_members.php?id=' . $groupId . '&u=' . $friendId . '&action=delete"'
327+
)
328+
];
329+
}
308330
}

tests/features/socialGroup.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@ Feature: Social Group
3232
And I am on "/main/social/invitations.php"
3333
And I follow "deny-invitation-1"
3434
Then I should see "Group invitation was denied"
35+
36+
Scenario: Delete user from group
37+
Given I am a platform administrator
38+
When I try delete a friend with id "11" from the social group with id "1"
39+
Then I should see "The user has been deleted"

0 commit comments

Comments
 (0)