From b4878809e3b9f4d2ae15045bb0b89b23b468570f Mon Sep 17 00:00:00 2001 From: Saikat Sarkar Date: Thu, 5 Dec 2024 11:52:36 -0700 Subject: [PATCH] Update enterprise_search URLs to elasticsearch --- .../console/public/application/lib/load_from.test.ts | 8 ++++---- src/plugins/navigation/common/constants.ts | 2 +- x-pack/plugins/enterprise_search/common/constants.ts | 2 +- .../public/applications/shared/cypress/routes.ts | 2 +- .../kibana_chrome/generate_breadcrumbs.test.ts | 12 ++++++------ .../shared/layout/classic_nav_helpers.test.ts | 10 +++++----- .../public/applications/shared/layout/nav.test.tsx | 4 ++-- .../public/classic_navigation.test.ts | 10 +++++----- .../accessibility/apps/group3/enterprise_search.ts | 2 +- x-pack/test/functional/config.base.js | 2 +- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/plugins/console/public/application/lib/load_from.test.ts b/src/plugins/console/public/application/lib/load_from.test.ts index 8e79dae8764de..d7a2066f72049 100644 --- a/src/plugins/console/public/application/lib/load_from.test.ts +++ b/src/plugins/console/public/application/lib/load_from.test.ts @@ -102,11 +102,11 @@ describe('load from lib', () => { it('works with a non-hash route', () => { mockWindow.location = { ...mockWindow.location, - pathname: '/foo/app/enterprise_search/overview', + pathname: '/foo/app/elasticsearch/overview', }; const codeSnippet = 'GET /_stats'; const expectedUrl = - 'https://my-kibana.elastic.co/foo/app/enterprise_search/overview?load_from=data%3Atext%2Fplain%2COIUQKgBA9A%2BgzgFwIYLkA'; + 'https://my-kibana.elastic.co/foo/app/elasticsearch/overview?load_from=data%3Atext%2Fplain%2COIUQKgBA9A%2BgzgFwIYLkA'; setLoadFromParameter(codeSnippet); expect(mockWindow.history.pushState).toHaveBeenCalledTimes(1); @@ -121,12 +121,12 @@ describe('load from lib', () => { it('works with a non-hash route and other params', () => { mockWindow.location = { ...mockWindow.location, - pathname: '/foo/app/enterprise_search/overview', + pathname: '/foo/app/elasticsearch/overview', search: '?foo=bar', }; const codeSnippet = 'GET /_stats'; const expectedUrl = - 'https://my-kibana.elastic.co/foo/app/enterprise_search/overview?foo=bar&load_from=data%3Atext%2Fplain%2COIUQKgBA9A%2BgzgFwIYLkA'; + 'https://my-kibana.elastic.co/foo/app/elasticsearch/overview?foo=bar&load_from=data%3Atext%2Fplain%2COIUQKgBA9A%2BgzgFwIYLkA'; setLoadFromParameter(codeSnippet); expect(mockWindow.history.pushState).toHaveBeenCalledTimes(1); diff --git a/src/plugins/navigation/common/constants.ts b/src/plugins/navigation/common/constants.ts index 0a054aff5dc2f..0d527e3b49056 100644 --- a/src/plugins/navigation/common/constants.ts +++ b/src/plugins/navigation/common/constants.ts @@ -11,7 +11,7 @@ export const DEFAULT_ROUTE_UI_SETTING_ID = 'defaultRoute'; export const DEFAULT_ROUTES = { classic: '/app/home', - es: '/app/enterprise_search/overview', + es: '/app/elasticsearch/overview', oblt: '/app/observabilityOnboarding', security: '/app/security/get_started', }; diff --git a/x-pack/plugins/enterprise_search/common/constants.ts b/x-pack/plugins/enterprise_search/common/constants.ts index 3ca27a406aed3..b8a134eb08124 100644 --- a/x-pack/plugins/enterprise_search/common/constants.ts +++ b/x-pack/plugins/enterprise_search/common/constants.ts @@ -42,7 +42,7 @@ export const ENTERPRISE_SEARCH_OVERVIEW_PLUGIN = { DESCRIPTION: i18n.translate('xpack.enterpriseSearch.overview.description', { defaultMessage: 'Create search experiences with a refined set of APIs and tools.', }), - URL: '/app/enterprise_search/overview', + URL: '/app/elasticsearch/overview', LOGO: 'logoEnterpriseSearch', }; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/cypress/routes.ts b/x-pack/plugins/enterprise_search/public/applications/shared/cypress/routes.ts index b1a0aaba95661..3d74b81cfddb9 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/cypress/routes.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/cypress/routes.ts @@ -5,6 +5,6 @@ * 2.0. */ -export const overviewPath = '/app/enterprise_search/overview'; +export const overviewPath = '/app/elasticsearch/overview'; export const appSearchPath = '/app/enterprise_search/app_search'; export const workplaceSearchPath = '/app/enterprise_search/workplace_search'; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_breadcrumbs.test.ts b/x-pack/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_breadcrumbs.test.ts index 47dcd899d82cf..7cda1c6893b17 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_breadcrumbs.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_breadcrumbs.test.ts @@ -163,7 +163,7 @@ describe('useSearchBreadcrumbs', () => { expect(useSearchBreadcrumbs(breadcrumbs)).toEqual([ { text: 'Elasticsearch', - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', onClick: expect.any(Function), }, { @@ -206,7 +206,7 @@ describe('useEnterpriseSearchBreadcrumbs', () => { expect(useEnterpriseSearchBreadcrumbs(breadcrumbs)).toEqual([ { text: 'Enterprise Search', - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', onClick: expect.any(Function), }, { @@ -252,7 +252,7 @@ describe('useAppSearchBreadcrumbs', () => { expect(useAppSearchBreadcrumbs(breadcrumbs)).toEqual([ { text: 'Enterprise Search', - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', onClick: expect.any(Function), }, { @@ -275,7 +275,7 @@ describe('useAppSearchBreadcrumbs', () => { expect(useAppSearchBreadcrumbs()).toEqual([ { text: 'Enterprise Search', - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', onClick: expect.any(Function), }, { @@ -308,7 +308,7 @@ describe('useWorkplaceSearchBreadcrumbs', () => { expect(useWorkplaceSearchBreadcrumbs(breadcrumbs)).toEqual([ { text: 'Enterprise Search', - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', onClick: expect.any(Function), }, { @@ -331,7 +331,7 @@ describe('useWorkplaceSearchBreadcrumbs', () => { expect(useWorkplaceSearchBreadcrumbs()).toEqual([ { text: 'Enterprise Search', - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', onClick: expect.any(Function), }, { diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/classic_nav_helpers.test.ts b/x-pack/plugins/enterprise_search/public/applications/shared/layout/classic_nav_helpers.test.ts index 8784f006379a8..4029b9177a0b1 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/classic_nav_helpers.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/classic_nav_helpers.test.ts @@ -22,7 +22,7 @@ describe('generateSideNavItems', () => { const deepLinksMap = { enterpriseSearch: { id: 'enterpriseSearch', - url: '/app/enterprise_search/overview', + url: '/app/elasticsearch/overview', title: 'Overview', }, 'enterpriseSearchContent:searchIndices': { @@ -58,7 +58,7 @@ describe('generateSideNavItems', () => { expect(generateSideNavItems(classicNavItems, deepLinksMap)).toEqual([ { - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', id: 'unit-test', isSelected: false, name: 'Overview', @@ -88,7 +88,7 @@ describe('generateSideNavItems', () => { id: 'parent', items: [ { - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', id: 'unit-test', isSelected: false, name: 'Overview', @@ -113,7 +113,7 @@ describe('generateSideNavItems', () => { expect(generateSideNavItems(classicNavItems, deepLinksMap)).toEqual([ { - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', id: 'unit-test', isSelected: false, name: 'Home', @@ -141,7 +141,7 @@ describe('generateSideNavItems', () => { expect(generateSideNavItems(classicNavItems, deepLinksMap)).toEqual([ { - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', id: 'unit-test', isSelected: false, name: 'Home', diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx index de89440c4efea..1985c4be8568a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx @@ -35,7 +35,7 @@ const DEFAULT_PRODUCT_ACCESS: ProductAccess = { const baseNavItems = [ expect.objectContaining({ 'data-test-subj': 'searchSideNav-Home', - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', id: 'home', items: undefined, }), @@ -170,7 +170,7 @@ const baseNavItems = [ const mockNavLinks = [ { id: 'enterpriseSearch', - url: '/app/enterprise_search/overview', + url: '/app/elasticsearch/overview', }, { id: 'enterpriseSearchContent:searchIndices', diff --git a/x-pack/plugins/search_solution/search_navigation/public/classic_navigation.test.ts b/x-pack/plugins/search_solution/search_navigation/public/classic_navigation.test.ts index 68caac7f17a41..be9c231373ab0 100644 --- a/x-pack/plugins/search_solution/search_navigation/public/classic_navigation.test.ts +++ b/x-pack/plugins/search_solution/search_navigation/public/classic_navigation.test.ts @@ -15,7 +15,7 @@ describe('classicNavigationFactory', function () { const mockedNavLinks: Array> = [ { id: 'enterpriseSearch', - url: '/app/enterprise_search/overview', + url: '/app/elasticsearch/overview', title: 'Overview', }, { @@ -69,7 +69,7 @@ describe('classicNavigationFactory', function () { icon: 'logoEnterpriseSearch', items: [ { - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', id: 'unit-test', isSelected: false, name: 'Overview', @@ -82,7 +82,7 @@ describe('classicNavigationFactory', function () { it('will set isSelected', () => { mockHistory.location.pathname = '/overview'; - mockHistory.createHref.mockReturnValue('/app/enterprise_search/overview'); + mockHistory.createHref.mockReturnValue('/app/elasticsearch/overview'); const items: ClassicNavItem[] = [ { @@ -96,7 +96,7 @@ describe('classicNavigationFactory', function () { const solutionNav = classicNavigationFactory(items, core, history); expect(solutionNav!.items).toEqual([ { - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', id: 'unit-test', isSelected: true, name: 'Overview', @@ -190,7 +190,7 @@ describe('classicNavigationFactory', function () { const solutionNav = classicNavigationFactory(items, core, history); expect(solutionNav!.items).toEqual([ { - href: '/app/enterprise_search/overview', + href: '/app/elasticsearch/overview', id: 'unit-test', isSelected: false, name: 'Overview', diff --git a/x-pack/test/accessibility/apps/group3/enterprise_search.ts b/x-pack/test/accessibility/apps/group3/enterprise_search.ts index 35d8656c5bcc5..2ac781e387a35 100644 --- a/x-pack/test/accessibility/apps/group3/enterprise_search.ts +++ b/x-pack/test/accessibility/apps/group3/enterprise_search.ts @@ -28,7 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('Overview', () => { before(async () => { - await common.navigateToApp('enterprise_search/overview'); + await common.navigateToApp('elasticsearch/overview'); }); it('loads a landing page with product cards', async function () { diff --git a/x-pack/test/functional/config.base.js b/x-pack/test/functional/config.base.js index d5c6d77785b85..eb13de1c0c9e8 100644 --- a/x-pack/test/functional/config.base.js +++ b/x-pack/test/functional/config.base.js @@ -197,7 +197,7 @@ export default async function ({ readConfigFile }) { pathname: '/app/management/kibana/observabilityAiAssistantManagement', }, enterpriseSearch: { - pathname: '/app/enterprise_search/overview', + pathname: '/app/elasticsearch/overview', }, },