fix the contract description renderer where content was breaking (#24047)

This commit is contained in:
Ashish Gupta 2025-10-28 18:21:42 +05:30 committed by GitHub
parent c903f3b485
commit a98ce177fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 9 deletions

View File

@ -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', () => {

View File

@ -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>
)}