MDL-72110 core_navigation: home page preference

Admin should respect the home page preference set
just like any other user. Also when user preference
is set to dashboard, the home points to the dashboard
and the dashboard should become "Site home" which would
point to Site home.
This commit is contained in:
Sujith Haridasan 2021-08-24 20:28:36 +05:30
parent 300d0bc03a
commit 16e939fe2c
4 changed files with 27 additions and 18 deletions

View file

@ -20,6 +20,11 @@ Feature: Set the site home page and dashboard as the default home page
Given I log in as "admin"
And I am on site homepage
And I turn editing mode on
And I add the "Navigation" block if not present
And I configure the "Navigation" block
And I set the following fields to these values:
| Page contexts | Display throughout the entire site |
And I press "Save changes"
And I add the "Administration" block if not present
And I configure the "Administration" block
And I set the following fields to these values:
@ -31,16 +36,16 @@ Feature: Set the site home page and dashboard as the default home page
And I am on site homepage
And I follow "Make this my home page"
And I should not see "Make this my home page"
# The following lines should be changed once MDL-72110 is resolved.
# And I am on "Course 1" course homepage
# And "Home" "text" should exist in the ".breadcrumb" "css_element"
And I am on "Course 1" course homepage
And I should see "Home" in the "Navigation" "block"
And I should not see "Site home" in the "Navigation" "block"
And I am on site homepage
And I follow "Dashboard"
And I follow "Make this my home page"
And I should not see "Make this my home page"
# The following lines should be changed once MDL-72110 is resolved.
# And I am on "Course 1" course homepage
# Then "Dashboard" "text" should exist in the ".breadcrumb" "css_element"
And I am on "Course 1" course homepage
Then I should not see "Home" in the "Navigation" "block"
And I should see "Site home" in the "Navigation" "block"
Scenario: User cannot configure their preferred default home page unless allowed by admin
Given I log in as "user1"