diff --git a/x-pack/plugins/apm/public/components/app/ServiceMap/index.test.tsx b/x-pack/plugins/apm/public/components/app/ServiceMap/index.test.tsx index 2f05842b6bdec..e7ce4bb24b38f 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceMap/index.test.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceMap/index.test.tsx @@ -5,6 +5,7 @@ */ import { render } from '@testing-library/react'; +import { createMemoryHistory } from 'history'; import { CoreStart } from 'kibana/public'; import React, { ReactNode } from 'react'; import { createKibanaReactContext } from 'src/plugins/kibana_react/public'; @@ -15,6 +16,10 @@ import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_ap import { LicenseContext } from '../../../context/license/license_context'; import * as useFetcherModule from '../../../hooks/use_fetcher'; import { ServiceMap } from './'; +import { UrlParamsProvider } from '../../../context/url_params_context/url_params_context'; +import { Router } from 'react-router-dom'; + +const history = createMemoryHistory(); const KibanaReactContext = createKibanaReactContext({ usageCollection: { reportUiCounter: () => {} }, @@ -49,7 +54,9 @@ function createWrapper(license: License | null) { - {children} + + {children} + diff --git a/x-pack/plugins/apm/public/components/app/ServiceMap/index.tsx b/x-pack/plugins/apm/public/components/app/ServiceMap/index.tsx index 48a7f8f77ab84..da4a8596970ec 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceMap/index.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceMap/index.tsx @@ -39,21 +39,34 @@ const ServiceMapDatePickerFlexGroup = styled(EuiFlexGroup)` margin: 0; `; +function DatePickerSection() { + return ( + + + + + + ); +} + function PromptContainer({ children }: { children: ReactNode }) { return ( - - + + - {children} - - + + {children} + + + ); } @@ -137,11 +150,7 @@ export function ServiceMap({ return ( <> - - - - - +