Skip to content

Commit

Permalink
XIVY-15526 remove cmsBadge prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivy-fhe committed Dec 12, 2024
1 parent d27d40a commit 667fcca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/editor/src/utils/badge-properties.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('createBadges', () => {
render(<InputBadge badgeProps={badgeProps} value={inputValues} className='badge-output' />);
const testDataBadge = screen.getByText('testData');
const logicBadge = screen.getByText('testLogic');
const cmsBadge = screen.getByText('.../cssIcon');
const cmsBadge = screen.getByText('cssIcon');
const expBadge = screen.getByText('el.expression');

expect(testDataBadge).toBeVisible();
Expand All @@ -21,7 +21,7 @@ describe('createBadges', () => {

expect(testDataBadge).toHaveTextContent('testData');
expect(logicBadge).toHaveTextContent('testLogic');
expect(cmsBadge).toHaveTextContent('.../cssIcon');
expect(cmsBadge).toHaveTextContent('cssIcon');
expect(expBadge).toHaveTextContent('el.expression');

expect(testDataBadge?.querySelector('i.ivy-attribute')).toBeVisible();
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/utils/badge-properties.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CmsTooltip } from './CmsTooltip';
const badgePropertyCMS: BadgeType = {
regex: /#{\s*ivy.cms.co[^}]+}/,
icon: IvyIcons.Cms,
badgeTextGen: (text: string) => '...' + text.replaceAll(/#{\s*ivy.cms.co\(['"]|.*(?=\/)|['"]\)\s*}/g, ''),
badgeTextGen: (text: string) => text.replaceAll(/#{\s*ivy.cms.co\(['"]|.*(?=\/)\/|['"]\)\s*}/g, ''),
tooltip: (text: string) => <CmsTooltip text={text} />
};

Expand Down

0 comments on commit 667fcca

Please sign in to comment.