send_multiple_messages.feature 1.74 KB
Newer Older
Aaron Wells's avatar
Aaron Wells committed
1
@javascript @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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
   # Sending message 1
   And I choose "Find friends" in "Groups"
   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
   And I choose "Find friends" in "Groups"
   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
   And I choose "Find friends" in "Groups"
   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"
   # Log out as "Admin" user
   And I follow "Logout"
   # Log in as user 1
45
   Then I log in as "Bob" with password "Kupuhipa1"
46
   # Confirming all messages has been received
47
48
   And I am on homepage
   And I should see "Hi there"
49
   And I follow "mail"
50
51
52
53
   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"