AutorÃa | Ultima modificación | Ver Log |
@core @core_userFeature: Set the site home page and dashboard as the default home pageIn order to set a page as my default home pageAs a userI need to choose which page I want and set it as my home pageBackground:Given the following "courses" exist:| fullname | shortname | category | groupmode || Course 1 | C1 | 0 | 1 |And the following "users" exist:| username | firstname | lastname | email || user1 | User | One | user1@example.com |And the following "course enrolments" exist:| user | course | role || user1 | C1 | student |Scenario: Admin sets the site page and then the dashboard as the default home page# This functionality does not work without the administration block.Given I log in as "admin"And I am on site homepageAnd I turn editing mode onAnd the following config values are set as admin:| unaddableblocks | | theme_boost|And I add the "Navigation" block if not presentAnd I configure the "Navigation" blockAnd 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 presentAnd I configure the "Administration" blockAnd I set the following fields to these values:| Page contexts | Display throughout the entire site |And I press "Save changes"And I navigate to "Appearance > Navigation" in site administrationAnd I set the field "Start page for users" to "User preference"And I press "Save changes"And I am on site homepageAnd I follow "Make this my home page"And I should not see "Make this my home page"And I am on "Course 1" course homepageAnd I should see "Home" in the "Navigation" "block"And I should not see "Site home" in the "Navigation" "block"And I am on site homepageAnd I follow "Dashboard"And I follow "Make this my home page"And I should not see "Make this my home page"And I am on "Course 1" course homepageThen 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 adminGiven I log in as "user1"When I follow "Preferences" in the user menuThen I should not see "Home page"Scenario Outline: User can configure their preferred default home page when allowed by adminGiven I log in as "admin"And I navigate to "Appearance > Navigation" in site administrationAnd I set the field "Start page for users" to "User preference"And I press "Save changes"And I log outWhen I log in as "user1"And I follow "Preferences" in the user menuAnd I follow "Start page"And I set the field "Start page" to "<preference>"And I press "Save changes"And I log outAnd I log in as "user1"Then I should see "<breadcrumb>" is active in navigationExamples:| preference | breadcrumb || Home | Home || Dashboard | Dashboard || My courses | My courses |