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: Mute and unmute conversations
3
  In order to manage my conversations
4
  As a user
5
  I need to be able to mute and unmute 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 | course |
24
      | student1 | G1    | C1     |
25
      | student2 | G1    | C1     |
26
    And the following config values are set as admin:
27
      | messaging | 1 |
28
    And the following "private messages" exist:
29
      | user     | contact  | message |
30
      | student1 | student2 | Hi!     |
31
 
32
  Scenario: Mute a group conversation
33
    Given I log in as "student1"
34
    When I open messaging
35
    And I open the "Group" conversations list
36
    Then "Group 1" "core_message > Message" should exist
37
    And "muted" "icon_container" in the "Group 1" "core_message > Message" should not be visible
38
    And I select "Group 1" conversation in messaging
39
    And "muted" "icon_container" in the "Group 1" "core_message > Message header" should not be visible
40
    And I open contact menu
41
    And I click on "Mute" "link" in the "conversation-actions-menu" "region"
42
    And "muted" "icon_container" in the "Group 1" "core_message > Message header" should be visible
43
    And I go back in "view-conversation" message drawer
44
    And "muted" "icon_container" in the "Group 1" "core_message > Message" should be visible
45
 
46
  Scenario: Mute a private conversation
47
    When I log in as "student1"
48
    And I open messaging
49
    Then I should see "Private"
50
    And I open the "Private" conversations list
51
    And I should see "Student 2"
52
    And "muted" "icon_container" in the "Student 2" "core_message > Message" should not be visible
53
    And I select "Student 2" conversation in messaging
54
    And "muted" "icon_container" in the "[data-action='view-contact']" "css_element" should not be visible
55
    And I open contact menu
56
    And I click on "Mute" "link" in the "conversation-actions-menu" "region"
57
    And "muted" "icon_container" in the "[data-action='view-contact']" "css_element" should be visible
58
    And I go back in "view-conversation" message drawer
59
    And "muted" "icon_container" in the "Student 2" "core_message > Message" should be visible
60
 
61
  Scenario: Unmute a group conversation
62
    Given the following "muted group conversations" exist:
63
      | user     | group | course |
64
      | student1 | G1    | C1     |
65
    When I log in as "student1"
66
    And I open messaging
67
    And I open the "Group" conversations list
68
    Then "Group 1" "core_message > Message" should exist
69
    And "muted" "icon_container" in the "Group 1" "core_message > Message" should be visible
70
    And I select "Group 1" conversation in messaging
71
    And "muted" "icon_container" in the "Group 1" "core_message > Message header" should be visible
72
    And I open contact menu
73
    And I click on "Unmute" "link" in the "conversation-actions-menu" "region"
74
    And "muted" "icon_container" in the "Group 1" "core_message > Message header" should not be visible
75
    And I go back in "view-conversation" message drawer
76
    And "muted" "icon_container" in the "Group 1" "core_message > Message" should not be visible
77
 
78
  Scenario: Unmute a private conversation
79
    Given the following "muted private conversations" exist:
80
      | user     | contact  |
81
      | student1 | student2 |
82
    When I log in as "student1"
83
    And I open messaging
84
    Then I should see "Private"
85
    And I open the "Private" conversations list
86
    And I should see "Student 2"
87
    And "muted" "icon_container" in the "Student 2" "core_message > Message" should be visible
88
    And I select "Student 2" conversation in messaging
89
    And "muted" "icon_container" in the "[data-action='view-contact']" "css_element" should be visible
90
    And I open contact menu
91
    And I click on "Unmute" "link" in the "conversation-actions-menu" "region"
92
    And "muted" "icon_container" in the "[data-action='view-contact']" "css_element" should not be visible
93
    And I go back in "view-conversation" message drawer
94
    And "muted" "icon_container" in the "Student 2" "core_message > Message" should not be visible