Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_message @javascript
2
Feature: Self conversation
3
  In order to have self-conversations
4
  As a user
5
  I need to be able to send messages to myself and read them
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | student1 | Student   | 1        | student1@example.com |
11
    And the following config values are set as admin:
12
      | messaging        | 1 |
13
      | messagingminpoll | 1 |
14
 
15
  Scenario: Self conversation exists
16
    Given I log in as "student1"
17
    When I open messaging
18
    Then "Student 1" "core_message > Message" should exist
19
    And I select "Student" conversation in messaging
20
    And I should see "Personal space"
21
 
22
  Scenario: Self conversation can be unstarred
23
    Given I log in as "student1"
24
    When I open messaging
25
    Then "Student 1" "core_message > Message" should exist
26
    And I select "Student" conversation in messaging
27
    And I open contact menu
28
    And I click on "Unstar" "link" in the "Student 1" "core_message > Message header"
29
    And I go back in "view-conversation" message drawer
30
    And I open the "Starred" conversations list
31
    And I should not see "Student 1" in the "favourites" "core_message > Message list area"
32
    And I open the "Private" conversations list
33
    And I should see "Student 1" in the "messages" "core_message > Message list area"
34
 
35
  Scenario: Self conversation can be deleted
36
    Given I log in as "student1"
37
    When I open messaging
38
    Then "Student 1" "core_message > Message" should exist
39
    And I select "Student 1" conversation in messaging
40
    And I open contact menu
41
    And I click on "Delete conversation" "link" in the "Student 1" "core_message > Message header"
42
    And I should see "Delete"
43
    And I click on "//button[@data-action='confirm-delete-conversation']" "xpath_element"
44
    And I should not see "Delete"
45
    And I go back in "view-conversation" message drawer
46
    And I open the "Starred" conversations list
47
    And I should not see "Student 1" in the "favourites" "core_message > Message list area"
48
    And I open the "Private" conversations list
49
    And I should not see "Student 1" in the "messages" "core_message > Message list area"
50
 
51
  Scenario: Send a message to a self-conversation via message drawer
52
    Given I log in as "student1"
53
    When I open messaging
54
    Then "Student 1" "core_message > Message" should exist
55
    And I select "Student 1" conversation in messaging
56
    And I send "Hi!" message in the message area
57
    And I should see "Hi!" in the "Student 1" "core_message > Message conversation"
58
    And I should see "##today##%d %B##" in the "Student 1" "core_message > Message conversation"
59
 
60
  Scenario: Send a message to a self-conversation via user profile
61
    Given I log in as "student1"
62
    When I follow "Profile" in the user menu
63
    Then I should see "Message"
64
    And I press "Message"
65
    And I send "Hi!" message in the message area
66
    And I should see "Hi!" in the "Student 1" "core_message > Message conversation"
67
    And I should see "##today##%d %B##" in the "Student 1" "core_message > Message conversation"