mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-24 22:52:09 +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 <div>RichTextEditorPreviewerNew</div>;
|
||||
return <div>RichTextEditorPreviewerV1</div>;
|
||||
});
|
||||
});
|
||||
|
||||
@ -240,8 +240,7 @@ describe('ContractDetail', () => {
|
||||
|
||||
expect(screen.getByText('Test Contract')).toBeInTheDocument();
|
||||
expect(screen.getByText('label.description')).toBeInTheDocument();
|
||||
|
||||
expect(screen.getAllByText('RichTextEditorPreviewerNew')).toHaveLength(2);
|
||||
expect(screen.getByText('RichTextEditorPreviewerV1')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should display contract actions', () => {
|
||||
|
||||
@ -61,7 +61,7 @@ import { showErrorToast, showSuccessToast } from '../../../utils/ToastUtils';
|
||||
import AlertBar from '../../AlertBar/AlertBar';
|
||||
import ErrorPlaceHolderNew from '../../common/ErrorWithPlaceholder/ErrorPlaceHolderNew';
|
||||
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 StatusBadgeV2 from '../../common/StatusBadge/StatusBadgeV2.component';
|
||||
import ContractExecutionChart from '../ContractExecutionChart/ContractExecutionChart.component';
|
||||
@ -439,10 +439,9 @@ const ContractDetail: React.FC<{
|
||||
<Divider className="contract-dash-separator" />
|
||||
</div>
|
||||
|
||||
<RichTextEditorPreviewerNew
|
||||
<RichTextEditorPreviewerV1
|
||||
enableSeeMoreVariant
|
||||
markdown={contract.description ?? ''}
|
||||
maxLineLength="3"
|
||||
/>
|
||||
</Col>
|
||||
)}
|
||||
@ -457,10 +456,9 @@ const ContractDetail: React.FC<{
|
||||
<Divider className="contract-dash-separator" />
|
||||
</div>
|
||||
|
||||
<RichTextEditorPreviewerNew
|
||||
<RichTextEditorPreviewerV1
|
||||
enableSeeMoreVariant
|
||||
markdown={contract.termsOfUse ?? ''}
|
||||
maxLineLength="3"
|
||||
/>
|
||||
</Col>
|
||||
)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user