diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ManageTab/DeleteWidgetBody.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ManageTab/DeleteWidgetBody.tsx deleted file mode 100644 index 7ed578ef36f..00000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/ManageTab/DeleteWidgetBody.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import React from 'react'; -import { TITLE_FOR_NON_ADMIN_ACTION } from '../../constants/constants'; -import { Button } from '../buttons/Button/Button'; -import NonAdminAction from '../common/non-admin-action/NonAdminAction'; - -type DeleteWidgetBodyProps = { - header: string; - description: string; - buttonText: string; - isOwner?: boolean; - hasPermission: boolean; - onClick: () => void; -}; - -const DeleteWidgetBody = ({ - header, - description, - buttonText, - isOwner, - hasPermission, - onClick, -}: DeleteWidgetBodyProps) => { - return ( -
{description}
-+ Manage {manageSectionType ? manageSectionType : 'Section'} +
You do not have permissions to update the owner.
- - } - isOwner={hasEditAccess} - permission={Operation.UpdateOwner} - position="left"> - -ToggleSwitchV1.Component
); }); +jest.mock('../common/DeleteWidget/DeleteWidget', () => { + return jest.fn().mockImplementation(() =>DeleteWidget.Component
); +}); + const mockTierData = { children: [ { @@ -121,7 +125,9 @@ describe('Test Manage tab Component', () => { ); const dangerZone = await findByTestId(container, 'danger-zone'); + const DeleteWidget = await findByText(container, 'DeleteWidget.Component'); expect(dangerZone).toBeInTheDocument(); + expect(DeleteWidget).toBeInTheDocument(); }); }); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Modals/EntityDeleteModal/EntityDeleteModal.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Modals/EntityDeleteModal/EntityDeleteModal.tsx index d2eadfa1037..93f7e4914a7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Modals/EntityDeleteModal/EntityDeleteModal.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Modals/EntityDeleteModal/EntityDeleteModal.tsx @@ -85,7 +85,7 @@ const EntityDeleteModal: FCDelete section
++ {header} +
++ {description} +
+Owner
++ Lorem ipsum dolor, sit amet consectetur adipisicing elit. + Necessitatibus, sint. +
+You do not have permissions to update the owner.
+ + } + isOwner={hasEditAccess} + permission={Operation.UpdateOwner} + position="left"> + ++ Open to join +
++ Lorem ipsum dolor, sit amet consectetur adipisicing elit. + Necessitatibus, sint. +
+