diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js index a92dc8c50d22f..6fae0c0704bf4 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js @@ -763,6 +763,13 @@ function discoverController( // Update defaults so that "reload saved query" functions correctly setAppState(getStateDefaults()); chrome.docTitle.change(savedSearch.lastSavedTitle); + chrome.setBreadcrumbs([ + { + text: discoverBreadcrumbsTitle, + href: '#/', + }, + { text: savedSearch.title }, + ]); } } }); diff --git a/test/functional/apps/discover/_discover.js b/test/functional/apps/discover/_discover.js index 93b204da360f1..db292207d76c3 100644 --- a/test/functional/apps/discover/_discover.js +++ b/test/functional/apps/discover/_discover.js @@ -68,6 +68,16 @@ export default function ({ getService, getPageObjects }) { }); }); + it('renaming a saved query should modify name in breadcrumb', async function () { + const queryName2 = 'Modified Query # 1'; + await PageObjects.discover.loadSavedSearch(queryName1); + await PageObjects.discover.saveSearch(queryName2); + + await retry.try(async function () { + expect(await PageObjects.discover.getCurrentQueryName()).to.be(queryName2); + }); + }); + it('should show the correct hit count', async function () { const expectedHitCount = '14,004'; await retry.try(async function () {