diff --git a/catalog-rest-service/src/main/resources/ui/src/components/my-data-details/SchemaTable.test.tsx b/catalog-rest-service/src/main/resources/ui/src/components/my-data-details/SchemaTable.test.tsx index a6337eb434f..5ccebe0da98 100644 --- a/catalog-rest-service/src/main/resources/ui/src/components/my-data-details/SchemaTable.test.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/components/my-data-details/SchemaTable.test.tsx @@ -19,14 +19,14 @@ import { getAllByTestId, render } from '@testing-library/react'; import { TableDetail } from 'Models'; import React from 'react'; import { MemoryRouter } from 'react-router-dom'; -import { Column, ColumnDataType } from '../../generated/entity/data/table'; +import { ColumnDataType } from '../../generated/entity/data/table'; import SchemaTable from './SchemaTable'; jest.mock('../common/rich-text-editor/RichTextEditorPreviewer', () => { return jest.fn().mockReturnValue(
RichTextEditorPreviewer
); }); -const mockColumns: Column[] = [ +const mockColumns = [ { name: 'testId', columnDataType: ColumnDataType.String, diff --git a/catalog-rest-service/src/main/resources/ui/src/components/my-data/MyDataHeader.test.tsx b/catalog-rest-service/src/main/resources/ui/src/components/my-data/MyDataHeader.test.tsx new file mode 100644 index 00000000000..10aef0c75a6 --- /dev/null +++ b/catalog-rest-service/src/main/resources/ui/src/components/my-data/MyDataHeader.test.tsx @@ -0,0 +1,163 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + + * http://www.apache.org/licenses/LICENSE-2.0 + + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +import { getByTestId, getByText, render } from '@testing-library/react'; +import React from 'react'; +import { MemoryRouter } from 'react-router'; +import MyDataHeader from './MyDataHeader'; + +describe('Test MyDataHeader Component', () => { + it('Component should render', () => { + const { container } = render( +TableDataCard
); +}); + +jest.mock('../Pagination', () => { + return jest.fn().mockReturnValue(Pagination
); +}); + +jest.mock('../onboarding/Onboarding', () => { + return jest.fn().mockReturnValue(Onboarding
); +}); + +jest.mock('../common/error-with-placeholder/ErrorPlaceHolderES', () => { + return jest.fn().mockReturnValue(ErrorPlaceHolderES
); +}); + +describe('Test SearchedData Component', () => { + it('Component should render', () => { + const { container } = render( +hello world
+hello world
+FormModal
); +}); + jest.mock( '../../components/containers/PageContainer', () => @@ -44,6 +123,27 @@ jest.mock( ) ); +jest.mock('./AddUsersModal', () => { + return jest + .fn() + .mockReturnValue(AddUsersModal
); +}); + +jest.mock('../../components/common/non-admin-action/NonAdminAction', () => { + return jest + .fn() + .mockImplementation(({ children }: { children: ReactNode }) => ( +