diff --git a/x-pack/plugins/apm/public/components/app/RumDashboard/URLFilter/URLSearch/SelectableUrlList.test.tsx b/x-pack/plugins/apm/public/components/app/RumDashboard/URLFilter/URLSearch/SelectableUrlList.test.tsx
index f4f7a179c813..0b6b3758ab4b 100644
--- a/x-pack/plugins/apm/public/components/app/RumDashboard/URLFilter/URLSearch/SelectableUrlList.test.tsx
+++ b/x-pack/plugins/apm/public/components/app/RumDashboard/URLFilter/URLSearch/SelectableUrlList.test.tsx
@@ -12,6 +12,7 @@ import {
waitForElementToBeRemoved,
screen,
} from '@testing-library/react';
+import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
import { createMemoryHistory } from 'history';
import * as fetcherHook from '../../../../../hooks/use_fetcher';
import { SelectableUrlList } from './SelectableUrlList';
@@ -32,35 +33,39 @@ describe('SelectableUrlList', () => {
function WrappedComponent() {
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
return (
-
+
+
+
);
}
it('it uses search term value from url', () => {
const { getByDisplayValue } = render(
- ,
+
+
+ ,
{ customHistory }
);
expect(getByDisplayValue('blog')).toBeInTheDocument();
@@ -68,18 +73,20 @@ describe('SelectableUrlList', () => {
it('maintains focus on search input field', () => {
const { getByLabelText } = render(
- ,
+
+
+ ,
{ customHistory }
);
diff --git a/x-pack/plugins/apm/public/components/routing/templates/settings_template.test.tsx b/x-pack/plugins/apm/public/components/routing/templates/settings_template.test.tsx
index b760bb312572..d52c758909ff 100644
--- a/x-pack/plugins/apm/public/components/routing/templates/settings_template.test.tsx
+++ b/x-pack/plugins/apm/public/components/routing/templates/settings_template.test.tsx
@@ -13,10 +13,12 @@ import { createMemoryHistory } from 'history';
import { MemoryRouter, RouteComponentProps } from 'react-router-dom';
import { CoreStart, DocLinksStart, HttpStart } from 'kibana/public';
import { createKibanaReactContext } from 'src/plugins/kibana_react/public';
+import { createCallApmApi } from '../../../services/rest/createCallApmApi';
const { location } = createMemoryHistory();
const KibanaReactContext = createKibanaReactContext({
+ notifications: { toasts: { add: () => {} } },
usageCollection: { reportUiCounter: () => {} },
observability: {
navigation: {
@@ -39,7 +41,7 @@ const KibanaReactContext = createKibanaReactContext({
observability: { guide: '' },
},
} as unknown as DocLinksStart,
-} as Partial);
+} as unknown as Partial);
function Wrapper({ children }: { children?: ReactNode }) {
return (
@@ -52,6 +54,9 @@ function Wrapper({ children }: { children?: ReactNode }) {
}
describe('Settings', () => {
+ beforeEach(() => {
+ createCallApmApi({} as CoreStart);
+ });
it('renders', async () => {
const routerProps = {
location,