2 Feature: Notification shown when user edit profile or preferences
3 In order to show notification
5 I press update profile button after make some changes in edit profile page
8 Given the following "users" exist:
9 | username | firstname | lastname | email |
10 | unicorn | Unicorn | 1 | unicorn@example.com |
11 And the following "courses" exist:
12 | fullname | shortname | category | groupmode |
13 | Course 1 | C1 | 0 | 1 |
14 And the following "course enrolments" exist:
15 | user | course | role |
16 | unicorn | C1 | student |
19 Scenario: Change own profile and has notification shown
20 Given I log in as "unicorn"
21 And I open my profile in edit mode
22 And I should see "Unicorn"
24 Then I set the field "Last name" to "Lil"
25 And I click on "Update profile" "button"
26 And I should see "Changes saved"
27 And I press "Dismiss this notification"
28 And I should not see "Changes saved"
29 And I follow "Preferences" in the user menu
30 And I follow "Preferred language"
31 And I click on "Save changes" "button"
32 And I should see "Changes saved"
33 And I follow "Forum preferences"
34 And I set the field "Use experimental nested discussion view" to "Yes"
35 And I click on "Save changes" "button"
36 And I should see "Changes saved"
39 Scenario: Do not show notification when cancel profile change
40 Given I log in as "unicorn"
41 And I open my profile in edit mode
42 And I should see "Unicorn"
44 Then I set the field "Last name" to "Lil"
45 And I click on "Cancel" "button"
46 And I should not see "Changes saved"
49 Scenario: Show notification after admin edited profile of another user
50 Given I am on the "unicorn" "user > editing" page logged in as "admin"
51 And I expand all fieldsets
52 Then I set the field "Last name" to "Lil"
53 And I click on "Update profile" "button"
54 And I should see "Changes saved"