friend_request.feature 1.59 KB
Newer Older
1
2
3
4
5
6
7
8
9
@javascript @core @core_account
Feature: Sending friend requests
In order to send a friend request and be directed to the right page
As an admin/user
So I can be friends with other users

Background:
Given the following "users" exist:
     | username | password | email | firstname | lastname | institution | authname | role |
10
     | userA | Kupuhipa1 | test01@example.com | Pete | Mc | mahara | internal | member |
11
12

Scenario: Sending friend requests from student to admin (Bug 1440908)
13
Given I log in as "admin" with password "Kupuhipa1"
14
And I choose "User search" in "Users" from Admin menu
15
And I follow "Pete"
16
17
18
19
20
21
22
And I follow "Log in as userA"
And I follow "Admin User"
And I follow "Request friendship"
And I fill in "Would you like to be my friend?" for "Message"
And I press "Request friendship"
And I follow "Become Admin User again"
And I am on homepage
23
# In my inbox block I'll see "New friend request"
24
And I click on "Show User Menu"
Son Nguyen's avatar
Son Nguyen committed
25
26
And I follow "Inbox:"
And I expand the section "New friend request"
27
# Clicking on the notification title to expand it
Son Nguyen's avatar
Son Nguyen committed
28
And I follow "Requests"
Son Nguyen's avatar
Son Nguyen committed
29
And I should see "Would you like to be my friend?"
30
31
32
And I press "Approve request"
And I should see "Accepted friend request"
And I follow "Log in as userA"
33
# In userA's inbox block I'll see a "Friend request accepted" notification
34
And I click on "Show User Menu"
Son Nguyen's avatar
Son Nguyen committed
35
36
And I follow "Inbox:"
And I expand the section "Friend request accepted"
37
# Expanding it shows me another "More..." link which takes me to the inbox
38
39
40
41
And I follow "More..."
And I should not see "Not Found"
And I should see "Remove from friends"
And I should see "Admin User's wall"