mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Enterprise Search] Remove Workplace Search from Top Level Search (#166747)
## Summary
Removes legacy Workplace Search result from the top level search.

This is part of the initiative for a longer term place for eventually
deprecating the legacy Workplace Search app.
### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
20be3d0b5d
commit
c5c2156621
2 changed files with 49 additions and 10 deletions
|
@ -8,7 +8,7 @@
|
|||
import { NEVER } from 'rxjs';
|
||||
import { TestScheduler } from 'rxjs/testing';
|
||||
|
||||
import { ENTERPRISE_SEARCH_CONTENT_PLUGIN } from '../../common/constants';
|
||||
import { APP_SEARCH_PLUGIN, ENTERPRISE_SEARCH_CONTENT_PLUGIN } from '../../common/constants';
|
||||
|
||||
import { getSearchResultProvider } from './search_result_provider';
|
||||
|
||||
|
@ -47,6 +47,18 @@ describe('Enterprise Search search provider', () => {
|
|||
},
|
||||
};
|
||||
|
||||
const appSearchResult = {
|
||||
icon: 'logoEnterpriseSearch',
|
||||
id: 'app_search',
|
||||
score: 100,
|
||||
title: 'App Search',
|
||||
type: 'Search',
|
||||
url: {
|
||||
path: `${APP_SEARCH_PLUGIN.URL}`,
|
||||
prependBasePath: true,
|
||||
},
|
||||
};
|
||||
|
||||
const searchResultProvider = getSearchResultProvider(basePathMock, {
|
||||
hasConnectors: true,
|
||||
hasWebCrawler: true,
|
||||
|
@ -192,5 +204,41 @@ describe('Enterprise Search search provider', () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
it('returns results for legacy app search', () => {
|
||||
const searchProvider = getSearchResultProvider(basePathMock, {
|
||||
hasConnectors: false,
|
||||
hasWebCrawler: false,
|
||||
canDeployEntSearch: true,
|
||||
} as any);
|
||||
getTestScheduler().run(({ expectObservable }) => {
|
||||
expectObservable(
|
||||
searchProvider.find(
|
||||
{ term: 'app search' },
|
||||
{ aborted$: NEVER, maxResults: 1, preference: '' },
|
||||
{} as any
|
||||
)
|
||||
).toBe('(a|)', {
|
||||
a: [appSearchResult],
|
||||
});
|
||||
});
|
||||
});
|
||||
it('does not return results for legacy workplace search', () => {
|
||||
const searchProvider = getSearchResultProvider(basePathMock, {
|
||||
hasConnectors: false,
|
||||
hasWebCrawler: false,
|
||||
canDeployEntSearch: true,
|
||||
} as any);
|
||||
getTestScheduler().run(({ expectObservable }) => {
|
||||
expectObservable(
|
||||
searchProvider.find(
|
||||
{ term: 'workplace search' },
|
||||
{ aborted$: NEVER, maxResults: 1, preference: '' },
|
||||
{} as any
|
||||
)
|
||||
).toBe('(a|)', {
|
||||
a: [],
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -18,7 +18,6 @@ import {
|
|||
ENTERPRISE_SEARCH_CONNECTOR_CRAWLER_SERVICE_TYPE,
|
||||
ENTERPRISE_SEARCH_CONTENT_PLUGIN,
|
||||
APP_SEARCH_PLUGIN,
|
||||
WORKPLACE_SEARCH_PLUGIN,
|
||||
ESRE_PLUGIN,
|
||||
} from '../../common/constants';
|
||||
|
||||
|
@ -106,14 +105,6 @@ export function getSearchResultProvider(
|
|||
serviceType: 'app_search',
|
||||
url: APP_SEARCH_PLUGIN.URL,
|
||||
},
|
||||
{
|
||||
keywords: ['workplace', 'search'],
|
||||
name: i18n.translate('xpack.enterpriseSearch.searchProvider.workplaceSearch.name', {
|
||||
defaultMessage: 'Workplace Search',
|
||||
}),
|
||||
serviceType: 'workplace_search',
|
||||
url: WORKPLACE_SEARCH_PLUGIN.URL,
|
||||
},
|
||||
{
|
||||
keywords: ['esre', 'search'],
|
||||
name: i18n.translate('xpack.enterpriseSearch.searchProvider.esre.name', {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue