From 3adda2cf0bc707b5d5f05daf66e2cb5f98a7e173 Mon Sep 17 00:00:00 2001 From: rshen91 Date: Wed, 16 Mar 2022 11:13:31 -0600 Subject: [PATCH] fix unit test --- .../add_from_library.test.tsx.snap | 20 ++++++++++++++++--- .../add_from_library.test.tsx | 8 +++----- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/plugins/shared_ux/public/components/toolbar/buttons/add_from_library/__snapshots__/add_from_library.test.tsx.snap b/src/plugins/shared_ux/public/components/toolbar/buttons/add_from_library/__snapshots__/add_from_library.test.tsx.snap index 727b7945979e8..d2fed27636d52 100644 --- a/src/plugins/shared_ux/public/components/toolbar/buttons/add_from_library/__snapshots__/add_from_library.test.tsx.snap +++ b/src/plugins/shared_ux/public/components/toolbar/buttons/add_from_library/__snapshots__/add_from_library.test.tsx.snap @@ -1,7 +1,15 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[` is rendered 1`] = ` +exports[` is rendered 1`] = ` is rendered 1`] = ` "openDataViewEditor": [MockFunction], } } + http={ + Object { + "addBasePath": [MockFunction], + } + } permissions={ Object { + "canAccessFleet": true, "canCreateNewDataView": true, } } @@ -23,7 +37,7 @@ exports[` is rendered 1`] = ` } } > - @@ -90,6 +104,6 @@ exports[` is rendered 1`] = ` - + `; diff --git a/src/plugins/shared_ux/public/components/toolbar/buttons/add_from_library/add_from_library.test.tsx b/src/plugins/shared_ux/public/components/toolbar/buttons/add_from_library/add_from_library.test.tsx index decf5884cb25d..438d41697e11a 100644 --- a/src/plugins/shared_ux/public/components/toolbar/buttons/add_from_library/add_from_library.test.tsx +++ b/src/plugins/shared_ux/public/components/toolbar/buttons/add_from_library/add_from_library.test.tsx @@ -11,9 +11,9 @@ import React from 'react'; import { ServicesProvider, SharedUXServices } from '../../../../services'; import { servicesFactory } from '../../../../services/mocks'; -import { SolutionToolbarButton } from '../primary/primary'; +import { ToolbarButton } from '../primary/primary'; -describe('', () => { +describe('', () => { let services: SharedUXServices; let mount: (element: JSX.Element) => ReactWrapper; @@ -24,9 +24,7 @@ describe('', () => { }); test('is rendered', () => { - const component = mount( - - ); + const component = mount(); expect(component).toMatchSnapshot(); });