mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-26 07:32:37 +00:00
fix the contract description renderer where content was breaking (#24047)
This commit is contained in:
parent
c903f3b485
commit
a98ce177fc
@ -103,9 +103,9 @@ jest.mock('../ContractSLACard/ContractSLA.component', () =>
|
|||||||
))
|
))
|
||||||
);
|
);
|
||||||
|
|
||||||
jest.mock('../../common/RichTextEditor/RichTextEditorPreviewNew', () => {
|
jest.mock('../../common/RichTextEditor/RichTextEditorPreviewerV1', () => {
|
||||||
return jest.fn().mockImplementation(() => {
|
return jest.fn().mockImplementation(() => {
|
||||||
return <div>RichTextEditorPreviewerNew</div>;
|
return <div>RichTextEditorPreviewerV1</div>;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -240,8 +240,7 @@ describe('ContractDetail', () => {
|
|||||||
|
|
||||||
expect(screen.getByText('Test Contract')).toBeInTheDocument();
|
expect(screen.getByText('Test Contract')).toBeInTheDocument();
|
||||||
expect(screen.getByText('label.description')).toBeInTheDocument();
|
expect(screen.getByText('label.description')).toBeInTheDocument();
|
||||||
|
expect(screen.getByText('RichTextEditorPreviewerV1')).toBeInTheDocument();
|
||||||
expect(screen.getAllByText('RichTextEditorPreviewerNew')).toHaveLength(2);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should display contract actions', () => {
|
it('should display contract actions', () => {
|
||||||
|
|||||||
@ -61,7 +61,7 @@ import { showErrorToast, showSuccessToast } from '../../../utils/ToastUtils';
|
|||||||
import AlertBar from '../../AlertBar/AlertBar';
|
import AlertBar from '../../AlertBar/AlertBar';
|
||||||
import ErrorPlaceHolderNew from '../../common/ErrorWithPlaceholder/ErrorPlaceHolderNew';
|
import ErrorPlaceHolderNew from '../../common/ErrorWithPlaceholder/ErrorPlaceHolderNew';
|
||||||
import { OwnerLabel } from '../../common/OwnerLabel/OwnerLabel.component';
|
import { OwnerLabel } from '../../common/OwnerLabel/OwnerLabel.component';
|
||||||
import RichTextEditorPreviewerNew from '../../common/RichTextEditor/RichTextEditorPreviewNew';
|
import RichTextEditorPreviewerV1 from '../../common/RichTextEditor/RichTextEditorPreviewerV1';
|
||||||
import { StatusType } from '../../common/StatusBadge/StatusBadge.interface';
|
import { StatusType } from '../../common/StatusBadge/StatusBadge.interface';
|
||||||
import StatusBadgeV2 from '../../common/StatusBadge/StatusBadgeV2.component';
|
import StatusBadgeV2 from '../../common/StatusBadge/StatusBadgeV2.component';
|
||||||
import ContractExecutionChart from '../ContractExecutionChart/ContractExecutionChart.component';
|
import ContractExecutionChart from '../ContractExecutionChart/ContractExecutionChart.component';
|
||||||
@ -439,10 +439,9 @@ const ContractDetail: React.FC<{
|
|||||||
<Divider className="contract-dash-separator" />
|
<Divider className="contract-dash-separator" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<RichTextEditorPreviewerNew
|
<RichTextEditorPreviewerV1
|
||||||
enableSeeMoreVariant
|
enableSeeMoreVariant
|
||||||
markdown={contract.description ?? ''}
|
markdown={contract.description ?? ''}
|
||||||
maxLineLength="3"
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
@ -457,10 +456,9 @@ const ContractDetail: React.FC<{
|
|||||||
<Divider className="contract-dash-separator" />
|
<Divider className="contract-dash-separator" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<RichTextEditorPreviewerNew
|
<RichTextEditorPreviewerV1
|
||||||
enableSeeMoreVariant
|
enableSeeMoreVariant
|
||||||
markdown={contract.termsOfUse ?? ''}
|
markdown={contract.termsOfUse ?? ''}
|
||||||
maxLineLength="3"
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user