send_multiple_messages.feature 2.49 KB
Newer Older
1
@javascript @core @core_messages
2
3
4
5
6
Feature: Send messages to other users
   In order to send a message to another user
   As an admin I need to create an user
   So I can send it messages

7
8
9
Background:
Given the following "users" exist:
     | username | password | email | firstname | lastname | institution | authname | role |
10
     | Bob | Kupuhipa1 | test01@example.com | Bob | Mc Bobby | mahara | internal | member |
11

12
13

Scenario: Sending messages between user and admin (Bug 1426983)
14
   # Log in as "Admin" user
15
   Given I log in as "admin" with password "Kupuhipa1"
16
17
   # Verifying log in was successful
   And I should see "Admin User"
18
   # Sending message 1
19
   And I choose "Find people" in "Groups" from main menu
20
21
22
23
24
25
26
   And I follow "Bob"
   And I follow "Send message"
   And I fill in the following:
   | Subject   | Hi there |
   | Message   | This is a test message   |
   And I press "Send message"
   # Sending message 2
27
   And I choose "Find people" in "Groups" from main menu
28
29
30
31
32
33
34
   And I follow "Bob"
   And I follow "Send message"
   And I fill in the following:
   | Subject   | Hi there2 |
   | Message   | This is a test message2   |
   And I press "Send message"
   # Sending message 3
35
   And I choose "Find people" in "Groups" from main menu
36
37
38
39
40
41
   And I follow "Bob"
   And I follow "Send message"
   And I fill in the following:
   | Subject   | Hi there3 |
   | Message   | This is a test message3   |
   And I press "Send message"
42
   And I choose "Find people" in "Groups" from main menu
43
44
45
46
47
48
49
50
   And I follow "Bob"
   And I follow "Request friendship"
   And I fill in the following:
   | Message   | I shot an arrow into the air, it fell to earth, I knew not where; For, so swiftly it flew, the sight could not follow it in its flight. Long, long afterward, in an oak I found the arrow, still unbroke; And the song, from beginning to end, I found again in the heart of a friend. |
   Then I should see "This field must be at most 255 characters long"
   And I fill in the following:
   | Message   | Written with a pen, sealed with a kiss, if you are my friend, please answer me this |
   And I press "Request friendship"
51
   # Log out as "Admin" user
52
   And I log out
53
   # Log in as user 1
54
   Then I log in as "Bob" with password "Kupuhipa1"
55
   # Confirming all messages has been received
56
   And I am on homepage
57
   And I wait "1" seconds
58
   And I should see "Hi there"
59
   And I choose "mail" from user menu by id
60
61
62
63
   And I should see "Hi there"
   And I should see "Hi there2"
   And I should see "Hi there3"
   And I should not see "Call stack"