From fec7949f37f51b308dffc74c049a4105e9da547b Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Wed, 11 Mar 2026 17:38:57 -0700 Subject: [PATCH] MDL-88122 navigation: omit empty breadcrumb container in output. --- public/lib/templates/navbar.mustache | 2 ++ public/theme/boost/tests/behat/breadcrumb.feature | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/public/lib/templates/navbar.mustache b/public/lib/templates/navbar.mustache index 6e94273bfe4..1b979d025f5 100644 --- a/public/lib/templates/navbar.mustache +++ b/public/lib/templates/navbar.mustache @@ -63,6 +63,7 @@ ] } }} +{{#get_items.0}} +{{/get_items.0}} diff --git a/public/theme/boost/tests/behat/breadcrumb.feature b/public/theme/boost/tests/behat/breadcrumb.feature index 94e1f8acb0c..bb38b571edf 100644 --- a/public/theme/boost/tests/behat/breadcrumb.feature +++ b/public/theme/boost/tests/behat/breadcrumb.feature @@ -44,7 +44,7 @@ Feature: Breadcrumbs navigation 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" + Then ".breadcrumb" "css_element" should not exist Scenario: Admin user sets the default home page to 'Dashboard' and navigates to its 'Preferences' and 'Private files' page Given the following config values are set as admin: @@ -52,10 +52,10 @@ Feature: Breadcrumbs navigation 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" + Then ".breadcrumb" "css_element" should not exist And I follow "Private files" in the user menu # There should be no breadcrumbs on this page. - And ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element" + And ".breadcrumb" "css_element" should not exist Scenario: Admin user sets the default home page to 'User preference' and navigates to its 'Preferences' and 'Private files' page Given the following config values are set as admin: @@ -63,10 +63,10 @@ Feature: Breadcrumbs navigation 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" + Then ".breadcrumb" "css_element" should not exist And I follow "Private files" in the user menu # There should be no breadcrumbs on this page. - And ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element" + And ".breadcrumb" "css_element" should not exist Scenario: Admin user sets the default home page to 'My courses' and navigates to its 'Preferences' and 'Private files' page Given the following config values are set as admin: @@ -74,7 +74,7 @@ Feature: Breadcrumbs navigation 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" + Then ".breadcrumb" "css_element" should not exist And I follow "Private files" in the user menu # There should be no breadcrumbs on this page. - And ".breadcrumb-item" "css_element" should not exist in the ".breadcrumb" "css_element" + And ".breadcrumb" "css_element" should not exist