diff --git a/course/tests/behat/course_category_breadcrumbs.feature b/course/tests/behat/course_category_breadcrumbs.feature index be041ead5c3..fb27467ca0d 100644 --- a/course/tests/behat/course_category_breadcrumbs.feature +++ b/course/tests/behat/course_category_breadcrumbs.feature @@ -244,18 +244,3 @@ Feature: Course category breadcrumbs navigation And I should see "Cat 1" in the ".page-context-header" "css_element" And I should see "Content bank" in the "region-main" "region" And I should see "Cat 1" in the ".block_navigation .active_tree_node" "css_element" - - Scenario: Admin user changes the default home page and navigates to 'course category management' page - Given I log in as "admin" - And I navigate to "Courses > Manage courses and categories" in site administration - And I follow "Cat 1" - And I should not see "My courses" in the ".breadcrumb" "css_element" - And the following config values are set as admin: - | defaulthomepage | 3 | - And I navigate to "Courses > Manage courses and categories" in site administration - When I follow "Cat 1" - Then I should see "My courses" in the ".breadcrumb" "css_element" - And I should see "Cat 1" in the ".breadcrumb" "css_element" - And I should see "Manage courses and categories" in the ".breadcrumb" "css_element" - And I should see "Cat 1" in the ".page-context-header" "css_element" - And I should see "Manage course categories and courses" in the "region-main" "region" diff --git a/theme/boost/tests/behat/breadcrumb.feature b/theme/boost/tests/behat/breadcrumb.feature index 7e55c572a8c..2ec398e2db2 100644 --- a/theme/boost/tests/behat/breadcrumb.feature +++ b/theme/boost/tests/behat/breadcrumb.feature @@ -31,3 +31,48 @@ Feature: Breadcrumbs navigation Then I should see "Caching" in the ".breadcrumb" "css_element" Then I should see "Cache stores" in the ".breadcrumb" "css_element" And I should see "Memcached" in the ".breadcrumb" "css_element" + + Scenario: Admin user changes the default home page and navigates to 'course category management' page + Given the following config values are set as admin: + | defaulthomepage | 3 | + And the following "categories" exist: + | name | category | idnumber | + | Cat 1 | 0 | CAT1 | + And I log in as "admin" + And I navigate to "Courses > Manage courses and categories" in site administration + When I follow "Cat 1" + Then I should not see "My courses" in the ".breadcrumb" "css_element" + And I should see "Cat 1" in the ".breadcrumb" "css_element" + And I should see "Manage courses and categories" in the ".breadcrumb" "css_element" + + Scenario: Admin user sets the default home page to 'Site' and navigates to its 'Preferences' page + Given the following config values are set as admin: + | defaulthomepage | 0 | + And I log in as "admin" + When I follow "Preferences" in the user menu + # There should be no breadcrumbs on this page. + Then ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element" + + Scenario: Admin user sets the default home page to 'Dashboard' and navigates to its 'Preferences' page + Given the following config values are set as admin: + | defaulthomepage | 1 | + And I log in as "admin" + When I follow "Preferences" in the user menu + # There should be no breadcrumbs on this page. + Then ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element" + + Scenario: Admin user sets the default home page to 'User preference' and navigates to its 'Preferences' page + Given the following config values are set as admin: + | defaulthomepage | 2 | + And I log in as "admin" + When I follow "Preferences" in the user menu + # There should be no breadcrumbs on this page. + Then ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element" + + Scenario: Admin user sets the default home page to 'My courses' and navigates to its 'Preferences' page + Given the following config values are set as admin: + | defaulthomepage | 3 | + And I log in as "admin" + When I follow "Preferences" in the user menu + # There should be no breadcrumbs on this page. + Then ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element"