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: Star and unstar conversations
3
  In order to manage a course group in a course
4
  As a user
5
  I need to be able to star and unstar conversations
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category | groupmode |
10
      | Course 1 | C1        | 0        | 1         |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email                |
13
      | student1 | Student   | 1        | student1@example.com |
14
      | student2 | Student   | 2        | student2@example.com |
15
    And the following "course enrolments" exist:
16
      | user     | course | role |
17
      | student1 | C1     | student |
18
      | student2 | C1     | student |
19
    And the following "groups" exist:
20
      | name    | course | idnumber | enablemessaging |
21
      | Group 1 | C1     | G1       | 1               |
22
    And the following "group members" exist:
23
      | user     | group |
24
      | student1 | G1 |
25
      | student2 | G1 |
26
    And the following config values are set as admin:
27
      | messaging        | 1 |
28
      | messagingminpoll | 1 |
29
 
30
  Scenario: Star a group conversation
31
    Given I log in as "student1"
32
    Then I open messaging
33
    And I open the "Group" conversations list
34
    And "Group 1" "core_message > Message" should exist
35
    And I select "Group 1" conversation in messaging
36
    And I open contact menu
37
    And I click on "Star conversation" "link" in the "conversation-actions-menu" "region"
38
    And I go back in "view-conversation" message drawer
39
    And I open the "Starred" conversations list
40
    And I should see "Group 1" in the "favourites" "core_message > Message list area"
41
    And I open the "Group" conversations list
42
    And I should not see "Group 1" in the "group-messages" "core_message > Message list area"
43
 
44
  Scenario: Unstar a group conversation
45
    Given I log in as "student1"
46
    Then I open messaging
47
    And I open the "Group" conversations list
48
    And "Group 1" "core_message > Message" should exist
49
    And I select "Group 1" conversation in messaging
50
    And I open contact menu
51
    And I click on "Star conversation" "link" in the "conversation-actions-menu" "region"
52
    And I go back in "view-conversation" message drawer
53
    And I open the "Starred" conversations list
54
    And I should see "Group 1" in the "favourites" "core_message > Message list area"
55
    And I select "Group 1" conversation in messaging
56
    And I open contact menu
57
    And I click on "Unstar" "link" in the "conversation-actions-menu" "region"
58
    And I go back in "view-conversation" message drawer
59
    And I open the "Starred" conversations list
60
    And I should not see "Group 1" in the "favourites" "core_message > Message list area"
61
    And I open the "Group" conversations list
62
    And I should see "Group 1" in the "group-messages" "core_message > Message list area"
63
 
64
  Scenario: Star a private conversation
65
    Given the following "private messages" exist:
66
      | user     | contact  | message |
67
      | student1 | student2 | Hi!     |
68
    Then I log in as "student1"
69
    And I open messaging
70
    And I open the "Private" conversations list
71
    And "Student 2" "core_message > Message" should exist
72
    And I select "Student 2" conversation in messaging
73
    And I open contact menu
74
    And I click on "Star conversation" "link" in the "conversation-actions-menu" "region"
75
    And I go back in "view-conversation" message drawer
76
    And I open the "Starred" conversations list
77
    And I should see "Student 2" in the "favourites" "core_message > Message list area"
78
    And I open the "Private" conversations list
79
    And I should not see "Student 2" in the "messages" "core_message > Message list area"
80
 
81
  Scenario: Unstar a private conversation
82
    Given the following "private messages" exist:
83
      | user     | contact  | message |
84
      | student1 | student2 | Hi!     |
85
    Given the following "favourite conversations" exist:
86
      | user     | contact  |
87
      | student1 | student2 |
88
    Then I log in as "student1"
89
    And I open messaging
90
    And I should see "Student 2" in the "favourites" "core_message > Message list area"
91
    And I select "Student 2" conversation in messaging
92
    And I open contact menu
93
    And I click on "Unstar" "link" in the "conversation-actions-menu" "region"
94
    And I go back in "view-conversation" message drawer
95
    And I open the "Starred" conversations list
96
    And I should not see "Group 1" in the "favourites" "core_message > Message list area"
97
    And I open the "Private" conversations list
98
    And I should see "Student 2" in the "messages" "core_message > Message list area"