Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_message
2
Feature: To be able to see and save user message preferences as admin
3
  As an admin
4
  I need to be able to view and edit message preferences for other users
5
 
6
  Background:
7
    Given the following "users" exist:
8
      | username | firstname | lastname | email                |
9
      | student1 | Student   | 1        | student1@emample.com |
10
    And the following "user preferences" exist:
11
      | user      | preference                                        | value |
12
      | student1  | message_provider_moodle_instantmessage_enabled    | email |
13
 
14
  @javascript
15
  Scenario: As an admin I can view and edit message preferences for a user
16
    Given I log in as "admin"
17
    And I navigate to "Messaging > Notification settings" in site administration
18
    And I set the field "email" to "1"
19
    And I press "Save changes"
20
    And I am on the "student1" "user > profile" page
21
    And I click on "Preferences" "link" in the "#region-main-box" "css_element"
22
    And I click on "Message preferences" "link" in the "#region-main-box" "css_element"
23
    And I should not see "Enabled" in the "Email" "table_row"
1441 ariadna 24
    And I click on "//div[@class='preference-state']//input" "xpath_element"
1 efrain 25
    And I log out
26
    And I log in as "student1"
27
    And I follow "Preferences" in the user menu
28
    And I click on "Message preferences" "link"
29
    And the field "Email" matches value "0"
1441 ariadna 30
 
31
  Scenario: Only active plugins have corresponding columns on the User preferences notification settings
32
    # Needed for Mobile column to appear on User preferences notification settings.
33
    Given the following config values are set as admin:
34
      | airnotifieraccesskey | test123 |
35
    And I log in as "admin"
36
    And I follow "Preferences" in the user menu
37
    When I click on "Notification preferences" "link" in the "#page-content" "css_element"
38
    # By default, web/popup is enabled. mobile/airnotifier is enabled using an earlier step while email is disabled.
39
    Then "[data-processor-name='popup']" "css_element" should exist
40
    And "[data-processor-name='email']" "css_element" should not exist
41
    And "[data-processor-name='airnotifier']" "css_element" should exist
42
 
43
  @javascript
44
  Scenario: An admin can set the default notification preferences
45
    Given I log in as "admin"
46
    And I navigate to "Messaging > Notification settings" in site administration
47
    And I set the field "email" to "1"
48
    And I press "Save changes"
49
    And I set the following fields to these values:
50
      | mod_assign_assign_notification_enabled[popup] | 1 |
51
      | mod_assign_assign_notification_enabled[email] | 0 |
52
      | mod_feedback_submission_enabled[popup]        | 0 |
53
      | mod_feedback_submission_locked[popup]         | 1 |
54
      | mod_feedback_submission_enabled[email]        | 1 |
55
      | mod_feedback_submission_locked[email]         | 1 |
56
      | mod_feedback_message_disable                  | 0 |
57
    And I log in as "student1"
58
    And I follow "Preferences" in the user menu
59
    When I click on "Notification preferences" "link" in the "#page-content" "css_element"
60
    # Assignment web notification is enabled, email is disabled.
61
    Then the field "message_provider_mod_assign_assign_notification_popup" matches value "1"
62
    And the field "message_provider_mod_assign_assign_notification_email" matches value "0"
63
    # Corresponding checkboxes can be updated.
64
    And I click on "message_provider_mod_assign_assign_notification_popup" "checkbox"
65
    And I click on "message_provider_mod_assign_assign_notification_email" "checkbox"
66
    And the field "message_provider_mod_assign_assign_notification_popup" matches value "0"
67
    And the field "message_provider_mod_assign_assign_notification_email" matches value "1"
68
    # Feedback submission notifications are locked off for web and locked on for email.
69
    And "Feedback notifications" row "Web" column of "preference-table" table should contain "Locked off"
70
    And "Feedback notifications" row "Requires configuration Email" column of "preference-table" table should contain "Locked on"
71
    # Feedback reminder is disabled.
72
    And I should not see "Feedback reminder"