Skip to content

Commit

Permalink
[Discover] Fix renaming of saved search not displayed in breadcrumb (e…
Browse files Browse the repository at this point in the history
…lastic#67577)

# Conflicts:
#	src/plugins/discover/public/application/angular/discover.js
  • Loading branch information
kertal committed Jun 5, 2020
1 parent 1c4883d commit 12e79c6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
]);
}
}
});
Expand Down
10 changes: 10 additions & 0 deletions test/functional/apps/discover/_discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit 12e79c6

Please sign in to comment.