mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-23 16:38:17 +00:00
* Fix #6497 UI : Replace arrow with `Read more` text * Add unit test * Fix unit test * Fix unit test
This commit is contained in:
parent
a878aa911c
commit
ee6dbe8adb
@ -98,6 +98,8 @@ describe('Test BlurLayout Component', () => {
|
|||||||
|
|
||||||
expect(displayButton).toBeInTheDocument();
|
expect(displayButton).toBeInTheDocument();
|
||||||
|
|
||||||
|
expect(displayButton).toHaveTextContent('Read less');
|
||||||
|
|
||||||
fireEvent.click(displayButton);
|
fireEvent.click(displayButton);
|
||||||
|
|
||||||
expect(displayMoreHandler).toBeCalled();
|
expect(displayMoreHandler).toBeCalled();
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import React, { FC } from 'react';
|
import React, { FC } from 'react';
|
||||||
import SVGIcons, { Icons } from '../../../utils/SvgUtils';
|
|
||||||
import { MAX_LENGTH } from './RichTextEditorPreviewer';
|
import { MAX_LENGTH } from './RichTextEditorPreviewer';
|
||||||
|
|
||||||
interface BlurLayoutProp {
|
interface BlurLayoutProp {
|
||||||
@ -51,12 +50,7 @@ export const BlurLayout: FC<BlurLayoutProp> = ({
|
|||||||
data-testid="display-button"
|
data-testid="display-button"
|
||||||
onClick={displayMoreHandler}>
|
onClick={displayMoreHandler}>
|
||||||
<span className="tw-flex tw-items-center tw-gap-2">
|
<span className="tw-flex tw-items-center tw-gap-2">
|
||||||
<SVGIcons
|
{displayMoreText ? 'Read less' : 'Read more'}
|
||||||
alt="expand-collapse"
|
|
||||||
className={classNames({ 'rotate-inverse': displayMoreText })}
|
|
||||||
icon={Icons.CHEVRON_DOWN}
|
|
||||||
width="32"
|
|
||||||
/>
|
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user