Línea 19... |
Línea 19... |
19 |
And I press "Save changes"
|
19 |
And I press "Save changes"
|
20 |
And I am on the "student1" "user > profile" page
|
20 |
And I am on the "student1" "user > profile" page
|
21 |
And I click on "Preferences" "link" in the "#region-main-box" "css_element"
|
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"
|
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"
|
23 |
And I should not see "Enabled" in the "Email" "table_row"
|
24 |
And I click on "//div[@class='preference-state']" "xpath_element"
|
24 |
And I click on "//div[@class='preference-state']//input" "xpath_element"
|
25 |
And I log out
|
25 |
And I log out
|
26 |
And I log in as "student1"
|
26 |
And I log in as "student1"
|
27 |
And I follow "Preferences" in the user menu
|
27 |
And I follow "Preferences" in the user menu
|
28 |
And I click on "Message preferences" "link"
|
28 |
And I click on "Message preferences" "link"
|
29 |
And the field "Email" matches value "0"
|
29 |
And the field "Email" matches value "0"
|
- |
|
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"
|