Skip to content

Commit c30c26e

Browse files
committed
address gitar
1 parent 48aeb17 commit c30c26e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityInfoDrawer/EdgeInfoDrawer.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import SectionWithEdit from '../../../components/common/SectionWithEdit/SectionW
2323
import { NO_DATA_PLACEHOLDER } from '../../../constants/constants';
2424
import { LINEAGE_SOURCE } from '../../../constants/Lineage.constants';
2525
import { CSMode } from '../../../enums/codemirror.enum';
26+
import { EntityType } from '../../../enums/entity.enum';
2627
import { AddLineage } from '../../../generated/api/lineage/addLineage';
2728
import { Source } from '../../../generated/type/entityLineage';
2829
import { getNameFromFQN } from '../../../utils/CommonUtils';
@@ -39,7 +40,6 @@ import { ModalWithFunctionEditor } from '../../Modals/ModalWithFunctionEditor/Mo
3940
import { ModalWithQueryEditor } from '../../Modals/ModalWithQueryEditor/ModalWithQueryEditor';
4041
import './entity-info-drawer.less';
4142
import { EdgeInfoDrawerInfo } from './EntityInfoDrawer.interface';
42-
import { EntityType } from '../../../enums/entity.enum';
4343

4444
const EdgeInfoDrawer = ({
4545
edge,

openmetadata-ui/src/main/resources/ui/src/components/common/DescriptionSection/DescriptionSection.test.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*/
1313
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
1414
import DescriptionSection from './DescriptionSection';
15+
import { EntityType } from '../../../enums/entity.enum';
1516

1617
// Mock i18n
1718
jest.mock('react-i18next', () => ({
@@ -84,7 +85,7 @@ describe('DescriptionSection', () => {
8485

8586
describe('Rendering - Empty Description', () => {
8687
it('renders title and no-data placeholder when description is empty', () => {
87-
const { container } = render(<DescriptionSection />);
88+
const { container } = render(<DescriptionSection entityType={EntityType.LINEAGE_EDGE} />);
8889

8990
expect(screen.getByText('label.description')).toBeInTheDocument();
9091
expect(
@@ -108,6 +109,7 @@ describe('DescriptionSection', () => {
108109
<DescriptionSection
109110
hasPermission
110111
showEditButton
112+
entityType={EntityType.LINEAGE_EDGE}
111113
onDescriptionUpdate={jest.fn()}
112114
/>
113115
);
@@ -120,6 +122,7 @@ describe('DescriptionSection', () => {
120122
it('does not show edit control when showEditButton is false', () => {
121123
render(
122124
<DescriptionSection
125+
entityType={EntityType.LINEAGE_EDGE}
123126
showEditButton={false}
124127
onDescriptionUpdate={jest.fn()}
125128
/>
@@ -133,7 +136,7 @@ describe('DescriptionSection', () => {
133136
});
134137

135138
it('does not show edit control when onDescriptionUpdate is not provided', () => {
136-
render(<DescriptionSection showEditButton />);
139+
render(<DescriptionSection showEditButton entityType={EntityType.LINEAGE_EDGE} />);
137140

138141
const clickable = document.querySelector(
139142
'.description-header .edit-icon'
@@ -149,6 +152,7 @@ describe('DescriptionSection', () => {
149152
<DescriptionSection
150153
hasPermission
151154
showEditButton
155+
entityType={EntityType.LINEAGE_EDGE}
152156
onDescriptionUpdate={jest.fn()}
153157
/>
154158
);
@@ -176,6 +180,7 @@ describe('DescriptionSection', () => {
176180
<DescriptionSection
177181
hasPermission
178182
showEditButton
183+
entityType={EntityType.LINEAGE_EDGE}
179184
onDescriptionUpdate={onUpdate}
180185
/>
181186
);
@@ -199,6 +204,7 @@ describe('DescriptionSection', () => {
199204
render(
200205
<DescriptionSection
201206
description="Some markdown text"
207+
entityType={EntityType.LINEAGE_EDGE}
202208
onDescriptionUpdate={jest.fn()}
203209
/>
204210
);
@@ -218,6 +224,7 @@ describe('DescriptionSection', () => {
218224
hasPermission
219225
showEditButton
220226
description="Content"
227+
entityType={EntityType.LINEAGE_EDGE}
221228
onDescriptionUpdate={jest.fn()}
222229
/>
223230
);

0 commit comments

Comments
 (0)