Rev 1 | AutorÃa | Comparar con el anterior | Ultima modificación | Ver Log |
@core @core_messageFeature: To be able to see and save user message preferences as adminAs an adminI need to be able to view and edit message preferences for other usersBackground:Given the following "users" exist:| username | firstname | lastname | email || student1 | Student | 1 | student1@emample.com |And the following "user preferences" exist:| user | preference | value || student1 | message_provider_moodle_instantmessage_enabled | email |@javascriptScenario: As an admin I can view and edit message preferences for a userGiven I log in as "admin"And I navigate to "Messaging > Notification settings" in site administrationAnd I set the field "email" to "1"And I press "Save changes"And I am on the "student1" "user > profile" pageAnd I click on "Preferences" "link" in the "#region-main-box" "css_element"And I click on "Message preferences" "link" in the "#region-main-box" "css_element"And I should not see "Enabled" in the "Email" "table_row"And I click on "//div[@class='preference-state']//input" "xpath_element"And I log outAnd I log in as "student1"And I follow "Preferences" in the user menuAnd I click on "Message preferences" "link"And the field "Email" matches value "0"Scenario: Only active plugins have corresponding columns on the User preferences notification settings# Needed for Mobile column to appear on User preferences notification settings.Given the following config values are set as admin:| airnotifieraccesskey | test123 |And I log in as "admin"And I follow "Preferences" in the user menuWhen I click on "Notification preferences" "link" in the "#page-content" "css_element"# By default, web/popup is enabled. mobile/airnotifier is enabled using an earlier step while email is disabled.Then "[data-processor-name='popup']" "css_element" should existAnd "[data-processor-name='email']" "css_element" should not existAnd "[data-processor-name='airnotifier']" "css_element" should exist@javascriptScenario: An admin can set the default notification preferencesGiven I log in as "admin"And I navigate to "Messaging > Notification settings" in site administrationAnd I set the field "email" to "1"And I press "Save changes"And I set the following fields to these values:| mod_assign_assign_notification_enabled[popup] | 1 || mod_assign_assign_notification_enabled[email] | 0 || mod_feedback_submission_enabled[popup] | 0 || mod_feedback_submission_locked[popup] | 1 || mod_feedback_submission_enabled[email] | 1 || mod_feedback_submission_locked[email] | 1 || mod_feedback_message_disable | 0 |And I log in as "student1"And I follow "Preferences" in the user menuWhen I click on "Notification preferences" "link" in the "#page-content" "css_element"# Assignment web notification is enabled, email is disabled.Then the field "message_provider_mod_assign_assign_notification_popup" matches value "1"And the field "message_provider_mod_assign_assign_notification_email" matches value "0"# Corresponding checkboxes can be updated.And I click on "message_provider_mod_assign_assign_notification_popup" "checkbox"And I click on "message_provider_mod_assign_assign_notification_email" "checkbox"And the field "message_provider_mod_assign_assign_notification_popup" matches value "0"And the field "message_provider_mod_assign_assign_notification_email" matches value "1"# Feedback submission notifications are locked off for web and locked on for email.And "Feedback notifications" row "Web" column of "preference-table" table should contain "Locked off"And "Feedback notifications" row "Requires configuration Email" column of "preference-table" table should contain "Locked on"# Feedback reminder is disabled.And I should not see "Feedback reminder"