|
| 1 | +@app_parallel_run_user @core_user @app @javascript @lms_from5.0 |
| 2 | +Feature: Test user menu disabled features |
| 3 | + |
| 4 | + Background: |
| 5 | + Given the Moodle site is compatible with this feature |
| 6 | + And the following "users" exist: |
| 7 | + | username | |
| 8 | + | student | |
| 9 | + And the following "courses" exist: |
| 10 | + | fullname | shortname | |
| 11 | + | Course 1 | C1 | |
| 12 | + And the following "course enrolments" exist: |
| 13 | + | user | course | role | |
| 14 | + | student | C1 | student | |
| 15 | + And the following "core_competency > plans" exist: |
| 16 | + | name | user | description | status | |
| 17 | + | Test-Plan1 | student| Description of plan for user 1 | active | |
| 18 | + And the following config values are set as admin: |
| 19 | + | contactdataprotectionofficer | 1 | tool_dataprivacy | |
| 20 | + And the following config values are set as admin: |
| 21 | + | sitepolicyhandler | tool_policy | |
| 22 | + |
| 23 | + Scenario: Check all user menu disabled features (not disabled) |
| 24 | + And I entered the app as "student" |
| 25 | + When I press the user menu button in the app |
| 26 | + Then I should find "Grades" in the app |
| 27 | + And I should find "Files" in the app |
| 28 | + And I should find "Reports" in the app |
| 29 | + And I should find "Badges" in the app |
| 30 | + And I should find "Blog entries" in the app |
| 31 | + And I should find "Learning plans" in the app |
| 32 | + And I should find "Policies and agreements" in the app |
| 33 | + And I should find "Data privacy" in the app |
| 34 | + And I should find "Switch account" in the app |
| 35 | + |
| 36 | + Scenario: Check all user menu disabled features |
| 37 | + # Use old name to allow working in all LMS versions. |
| 38 | + Given the following config values are set as admin: |
| 39 | + | disabledfeatures | $mmSideMenuDelegate_mmaGrades,$mmSideMenuDelegate_mmaFiles,CoreUserDelegate_AddonBadges:account,CoreUserDelegate_AddonBlog:account,$mmSideMenuDelegate_mmaCompetency,CoreUserDelegate_CorePolicy,CoreUserDelegate_CoreDataPrivacy,NoDelegate_SwitchAccount,CoreReportBuilderDelegate | tool_mobile | |
| 40 | + And I entered the app as "student" |
| 41 | + When I press the user menu button in the app |
| 42 | + Then I should not find "Grades" in the app |
| 43 | + And I should not find "Files" in the app |
| 44 | + And I should not find "Reports" in the app |
| 45 | + And I should not find "Badges" in the app |
| 46 | + And I should not find "Blog entries" in the app |
| 47 | + And I should not find "Learning plans" in the app |
| 48 | + And I should not find "Policies and agreements" in the app |
| 49 | + And I should not find "Data privacy" in the app |
| 50 | + And I should not find "Switch account" in the app |
0 commit comments