From 1bc15397dde339b6195123bea9540ae9339cfe79 Mon Sep 17 00:00:00 2001 From: Harsh Vador Date: Fri, 4 Dec 2026 10:44:58 +0530 Subject: [PATCH 1/6] Fixes #39651: show the linked user or team on a feed card's entity-link hover A conversation about a user or team wrapped its entity link in a popover given the post author, so hovering the link opened the author's card. Give the popover the linked user or team, with the team type for teams. --- .../ActivityFeedcardNew.component.test.tsx | 34 +++++++++++++++++++ .../ActivityFeedcardNew.component.tsx | 5 +-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.test.tsx index 96738a585915..16004e1cabbb 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.test.tsx @@ -31,6 +31,7 @@ import { ConversationSource, } from '../../../generated/entity/feed/conversation'; import { ReactionType } from '../../../generated/type/reaction'; +import UserPopOverCard from '../../common/PopOverCard/UserPopOverCard'; import ActivityFeedCardNew from './ActivityFeedcardNew.component'; const mockProviderValue = { @@ -216,6 +217,39 @@ describe('ActivityFeedCardNew', () => { ); }); + it.each([ + ['user', 'bob'], + ['team', 'Data Platform'], + ])( + 'opens the linked %s profile, not the author, from a conversation about it', + (entityType, name) => { + render( + + `, + entityRef: { + id: `${entityType}-id`, + type: entityType, + name, + fullyQualifiedName: name, + }, + }} + /> + + ); + + const entityLinkPopover = (UserPopOverCard as jest.Mock).mock.calls + .map(([props]) => props) + .find((props) => props.showUserName && !props.showUserProfile); + + expect(entityLinkPopover).toEqual( + expect.objectContaining({ type: entityType, userName: name }) + ); + } + ); + it('names the field a conversation was started on after the entity', () => { render( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.tsx index 940d45ef4182..08a5e04a4f36 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.tsx @@ -26,6 +26,7 @@ import { useTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; import withSuspenseFallback from '../../../components/AppRouter/withSuspenseFallback'; import { EntityType } from '../../../enums/entity.enum'; +import { OwnerType } from '../../../enums/user.enum'; import { ActivityEvent } from '../../../generated/entity/activity/activityEvent'; import { Conversation, @@ -302,7 +303,8 @@ const ActivityFeedCardNew = ({ + type={entityType === EntityType.TEAM ? OwnerType.TEAM : OwnerType.USER} + userName={entityFQN}> Date: Fri, 4 Dec 2026 10:45:49 +0530 Subject: [PATCH 2/6] Fixes #39652: do not narrow an asset's AI-mode Activity tab by the picked domain The domain interceptor exempts an asset's own activity, but only matched /activity/entity/, which the classic tab calls. AI mode reads the same tab from /activity/about and /activity/mentions with an entityLink, so it gained the picked domain and the backend filtered on it. Treat any activity request that carries an entityLink as being about one asset. --- .../ui/src/hoc/withDomainFilter.test.tsx | 29 +++++++++++-------- .../resources/ui/src/hoc/withDomainFilter.tsx | 11 +++++-- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/hoc/withDomainFilter.test.tsx b/openmetadata-ui/src/main/resources/ui/src/hoc/withDomainFilter.test.tsx index 2f73da50bf0c..485e1d37dc81 100644 --- a/openmetadata-ui/src/main/resources/ui/src/hoc/withDomainFilter.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/hoc/withDomainFilter.test.tsx @@ -212,6 +212,8 @@ describe('withDomainFilter', () => { '/activity/entity/table/7f8baaa6-6bf2-4b57-9a16-dcc0a38746b6', { days: 30 }, ], + ['/activity/about', { entityLink: '<#E::table::svc.db.sch.orders>', days: 30, limit: 200 }], + ['/activity/mentions', { entityLink: '<#E::table::svc.db.sch.orders>', days: 30, limit: 200 }], ])("should leave an asset's own activity unscoped (%s)", (url, params) => { (getPathNameFromWindowLocation as jest.Mock).mockReturnValue( '/table/svc.db.sch.orders' @@ -246,20 +248,23 @@ describe('withDomainFilter', () => { } ); - it('should scope the activity feed, which is a list across assets', () => { - (getPathNameFromWindowLocation as jest.Mock).mockReturnValue('/'); - mockGetState.mockReturnValue({ activeDomain: 'engineering' }); + it.each(['/activity', '/activity/mentions'])( + 'should scope the activity feed, which is a list across assets (%s)', + (url) => { + (getPathNameFromWindowLocation as jest.Mock).mockReturnValue('/'); + mockGetState.mockReturnValue({ activeDomain: 'engineering' }); - const result = withDomainFilter( - createMockConfig('get', '/activity', { days: 30, limit: 200 }) - ); + const result = withDomainFilter( + createMockConfig('get', url, { days: 30, limit: 200 }) + ); - expect(result.params).toEqual({ - days: 30, - limit: 200, - domain: 'engineering', - }); - }); + expect(result.params).toEqual({ + days: 30, + limit: 200, + domain: 'engineering', + }); + } + ); it.each([ ['/tasks', { aboutEntity: 'svc.db.sch.orders' }], diff --git a/openmetadata-ui/src/main/resources/ui/src/hoc/withDomainFilter.tsx b/openmetadata-ui/src/main/resources/ui/src/hoc/withDomainFilter.tsx index 5135873f17c9..aa4ed9275022 100644 --- a/openmetadata-ui/src/main/resources/ui/src/hoc/withDomainFilter.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/hoc/withDomainFilter.tsx @@ -34,13 +34,18 @@ const isTaskListAboutAssets = (config: InternalAxiosRequestConfig) => Boolean(config.url?.startsWith(`${TASKS_PATH}/`))) && ABOUT_ASSET_TASK_PARAMS.some((param) => Boolean(config.params?.[param])); -// An asset's own activity (its Activity tab) is not narrowed either; the activity feed is. +// An asset's own activity (its Activity tab, in either mode) is not narrowed either; the activity feed is. +const ACTIVITY_PATH = '/activity/'; const ASSET_ACTIVITY_PATH = '/activity/entity/'; +const isActivityAboutOneAsset = (config: InternalAxiosRequestConfig) => + Boolean(config.url?.startsWith(ASSET_ACTIVITY_PATH)) || + (Boolean(config.url?.startsWith(ACTIVITY_PATH)) && + Boolean(config.params?.entityLink)); + const isAboutOneAsset = (config: InternalAxiosRequestConfig) => config.method === 'get' && - (isTaskListAboutAssets(config) || - Boolean(config.url?.startsWith(ASSET_ACTIVITY_PATH))); + (isTaskListAboutAssets(config) || isActivityAboutOneAsset(config)); // A request about one asset never carries the pick, even when its caller passed one. const withoutDomain = ( From 10a500cd197341f1d5896eb81c84b88c5a4151f1 Mon Sep 17 00:00:00 2001 From: Harsh Vador Date: Fri, 4 Dec 2026 10:47:46 +0530 Subject: [PATCH 3/6] Fixes #39655: render the feed panel card as a button only when it has a press handler FeedPanelBodyV1New always gave its card role="button" and a tab stop. The classic feed tab renders it in the right panel without onFeedClick or onActivityClick, so keyboard and screen-reader users reached a button that did nothing. Add the role, tab stop, pointer cursor and key handler only when a handler is passed. --- .../FeedPanelBodyV1New.test.tsx | 27 +++++++++++++++++ .../ActivityFeedPanel/FeedPanelBodyV1New.tsx | 30 ++++++++++++------- 2 files changed, 47 insertions(+), 10 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedPanel/FeedPanelBodyV1New.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedPanel/FeedPanelBodyV1New.test.tsx index c64d945bec81..badff15cbacd 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedPanel/FeedPanelBodyV1New.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedPanel/FeedPanelBodyV1New.test.tsx @@ -11,6 +11,10 @@ * limitations under the License. */ import { fireEvent, render, screen } from '@testing-library/react'; +import { + ActivityEvent, + ActivityEventType, +} from '../../../generated/entity/activity/activityEvent'; import { Conversation, ConversationSource, @@ -40,7 +44,30 @@ const conversation: Conversation = { updatedAt: 1, }; +const activity: ActivityEvent = { + entity: { id: 'table-id', type: 'table', name: 'table' }, + eventType: ActivityEventType.DescriptionUpdated, + id: 'activity-1', + summary: 'Description updated', + timestamp: 1, +}; + describe('FeedPanelBodyV1New', () => { + it.each([ + ['a conversation', { feed: conversation }], + ['an activity', { activity }], + ])( + 'renders a plain card, not a focusable button, for %s nobody handles a press on', + (_, props) => { + render(); + + const card = screen.getByTestId('message-container'); + + expect(card).not.toHaveAttribute('role'); + expect(card).not.toHaveAttribute('tabindex'); + } + ); + it('opens the conversation from a click anywhere on the card', () => { const onFeedClick = jest.fn(); render( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedPanel/FeedPanelBodyV1New.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedPanel/FeedPanelBodyV1New.tsx index 0a14f2899d70..34864a216bd4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedPanel/FeedPanelBodyV1New.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedPanel/FeedPanelBodyV1New.tsx @@ -12,6 +12,7 @@ */ import { Card } from '@openmetadata/ui-core-components'; +import classNames from 'classnames'; import { isUndefined } from 'lodash'; import { FC, useCallback } from 'react'; import ActivityFeedCardNew from '../ActivityFeedCardNew/ActivityFeedcardNew.component'; @@ -22,6 +23,21 @@ import { import './feed-panel-body-v1.less'; import { FeedPanelBodyPropV1 } from './FeedPanelBodyV1.interface'; +// The card is a button only when someone handles its press. +const getCardContainerProps = (onActivate?: () => void) => ({ + className: classNames( + 'activity-feed-card-container', + CARD_CONTAINER_CLASS_NAME, + { 'tw:cursor-pointer': onActivate } + ), + ...(onActivate && { + role: 'button', + tabIndex: 0, + onClick: onActivate, + onKeyDown: handleCardContainerKeyDown(onActivate), + }), +}); + const FeedPanelBodyV1: FC = ({ feed, activity, @@ -51,13 +67,11 @@ const FeedPanelBodyV1: FC = ({ if (isActivityEvent) { return ( + {...getCardContainerProps( + onActivityClick ? handleActivityClick : undefined + )}> = ({ return ( + {...getCardContainerProps(onFeedClick ? handleFeedClick : undefined)}> Date: Fri, 4 Dec 2026 10:49:29 +0530 Subject: [PATCH 4/6] Fixes #39656: translate the vote-recorded toast Voting on a task or glossary term that still needs other approvers showed a hardcoded English "Vote recorded.". Use the existing keys: message.vote-recorded-waiting-for-other-approvers for tasks (as TaskReviewVotes does) and message.vote-recorded for glossary terms (as GlossaryHeader does). --- .../TaskFeedCardFromTask.component.test.tsx | 34 +++++++++++++++++++ .../TaskFeedCardFromTask.component.tsx | 2 +- .../TaskTab/TaskTabNew.component.test.tsx | 6 ++++ .../Task/TaskTab/TaskTabNew.component.tsx | 2 +- .../GlossaryTermTab.component.tsx | 2 +- .../GlossaryTermTab/GlossaryTermTab.test.tsx | 2 +- 6 files changed, 44 insertions(+), 4 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.test.tsx index 9f63ca00da90..daabb852a26d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.test.tsx @@ -36,6 +36,7 @@ import { isTagsTaskType, } from '../../../utils/TaskActionUtils'; import { useActivityFeedProvider } from '../ActivityFeedProvider/ActivityFeedProvider'; +import { showSuccessToast } from '../../../utils/ToastUtils'; import TaskFeedCardFromTask from './TaskFeedCardFromTask.component'; const MOCK_TASK: Task = { @@ -176,6 +177,11 @@ jest.mock('../../../utils/TaskActionUtils', () => ({ isRecognizerFeedbackTask: jest.fn().mockReturnValue(false), })); +jest.mock('../../../utils/ToastUtils', () => ({ + showErrorToast: jest.fn(), + showSuccessToast: jest.fn(), +})); + jest.mock('../../../utils/TaskNavigationUtils', () => ({ ...jest.requireActual('../../../utils/TaskNavigationUtils'), getTaskDetailPathFromTask: jest.fn().mockReturnValue('/tasks/1'), @@ -366,6 +372,34 @@ describe('TaskFeedCardFromTask', () => { expect(screen.queryByTestId('approve-button')).not.toBeInTheDocument(); }); + it('tells the voter their vote is recorded while the task waits for other approvers', async () => { + const assignedTask: Task = { + ...MOCK_TASK, + assignees: [ + { + id: 'current-user-id', + type: 'user', + name: 'current-user', + }, + ], + }; + (resolveTask as jest.Mock).mockResolvedValueOnce(assignedTask); + + await act(async () => { + render(, { + wrapper: MemoryRouter, + }); + }); + + fireEvent.click(screen.getByTestId('approve-button')); + + await waitFor(() => + expect(showSuccessToast).toHaveBeenCalledWith( + 'message.vote-recorded-waiting-for-other-approvers' + ) + ); + }); + it('approves and rejects an assigned task through the Task V2 API', async () => { const assignedTask: Task = { ...MOCK_TASK, diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.tsx index 1cf46aa2cb60..055b5b2ea532 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.tsx @@ -293,7 +293,7 @@ const TaskFeedCardFromTask = ({ ); showSuccessToast( isTaskPendingFurtherApproval(updatedTask) - ? 'Vote recorded.' + ? t('message.vote-recorded-waiting-for-other-approvers') : t('server.task-resolved-successfully') ); onAfterClose?.(); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTab/TaskTabNew.component.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTab/TaskTabNew.component.test.tsx index 40a7db478130..9f865cf83f6f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTab/TaskTabNew.component.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTab/TaskTabNew.component.test.tsx @@ -339,9 +339,11 @@ jest.mock( ); const mockShowErrorToast = jest.fn(); +const mockShowSuccessToast = jest.fn(); jest.mock('../../../../utils/ToastUtils', () => ({ ...jest.requireActual('../../../../utils/ToastUtils'), showErrorToast: (...args: unknown[]) => mockShowErrorToast(...args), + showSuccessToast: (...args: unknown[]) => mockShowSuccessToast(...args), })); jest.mock('../../../../rest/tasksAPI', () => ({ @@ -1458,6 +1460,10 @@ describe('TaskTabNew Component', () => { }, }); }); + + expect(mockShowSuccessToast).toHaveBeenCalledWith( + 'message.vote-recorded-waiting-for-other-approvers' + ); }); it('keeps workflow-driven tasks actionable outside the Open status', async () => { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTab/TaskTabNew.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTab/TaskTabNew.component.tsx index 58712b8ce1b5..45f3de4aa46a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTab/TaskTabNew.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTab/TaskTabNew.component.tsx @@ -766,7 +766,7 @@ export const TaskTabNew = ({ const taskRemainsOpen = isTaskPendingFurtherApproval(updatedTask); showSuccessToast( taskRemainsOpen - ? 'Vote recorded.' + ? t('message.vote-recorded-waiting-for-other-approvers') : t('server.task-resolved-successfully') ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx index e2eed88c9e2e..aa974da9fe9e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx @@ -1138,7 +1138,7 @@ const GlossaryTermTab = ({ isGlossary, className }: GlossaryTermTabProps) => { showSuccessToast( isPendingFurtherApproval - ? 'Vote recorded.' + ? t('message.vote-recorded') : t('server.task-resolved-successfully') ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTermTab/GlossaryTermTab.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTermTab/GlossaryTermTab.test.tsx index 562c55955cfc..658143e672e7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTermTab/GlossaryTermTab.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTermTab/GlossaryTermTab.test.tsx @@ -1279,7 +1279,7 @@ describe('Test GlossaryTermTab component', () => { ); }); - expect(mockShowSuccessToast).toHaveBeenCalledWith('Vote recorded.'); + expect(mockShowSuccessToast).toHaveBeenCalledWith('message.vote-recorded'); expect(mockSetGlossaryChildTerms).not.toHaveBeenCalled(); }); From 2a7b0531c5e0246b055d6687b3ac79f74a89b719 Mon Sep 17 00:00:00 2001 From: Harsh Vador Date: Fri, 4 Dec 2026 10:50:33 +0530 Subject: [PATCH 5/6] chore(ui): format the feed bug fixes and keep the entity-link memo under the complexity limit --- .../ActivityFeedcardNew.component.tsx | 5 ++++- .../TaskFeedCardFromTask.component.test.tsx | 2 +- .../Glossary/GlossaryTermTab/GlossaryTermTab.test.tsx | 4 +++- .../resources/ui/src/hoc/withDomainFilter.test.tsx | 10 ++++++++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.tsx index 08a5e04a4f36..2fd2b67611c3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.tsx @@ -113,6 +113,9 @@ const getFeedCardWrapperClassName = ( { 'active-card is-active': isActive } ); +const getLinkedOwnerType = (entityType: EntityType): OwnerType => + entityType === EntityType.TEAM ? OwnerType.TEAM : OwnerType.USER; + interface ThreadPanelEntityLinkProps { about: string; entityFQN: string; @@ -303,7 +306,7 @@ const ActivityFeedCardNew = ({ { ); }); - expect(mockShowSuccessToast).toHaveBeenCalledWith('message.vote-recorded'); + expect(mockShowSuccessToast).toHaveBeenCalledWith( + 'message.vote-recorded' + ); expect(mockSetGlossaryChildTerms).not.toHaveBeenCalled(); }); diff --git a/openmetadata-ui/src/main/resources/ui/src/hoc/withDomainFilter.test.tsx b/openmetadata-ui/src/main/resources/ui/src/hoc/withDomainFilter.test.tsx index 485e1d37dc81..9db2c84e1bc9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/hoc/withDomainFilter.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/hoc/withDomainFilter.test.tsx @@ -212,8 +212,14 @@ describe('withDomainFilter', () => { '/activity/entity/table/7f8baaa6-6bf2-4b57-9a16-dcc0a38746b6', { days: 30 }, ], - ['/activity/about', { entityLink: '<#E::table::svc.db.sch.orders>', days: 30, limit: 200 }], - ['/activity/mentions', { entityLink: '<#E::table::svc.db.sch.orders>', days: 30, limit: 200 }], + [ + '/activity/about', + { entityLink: '<#E::table::svc.db.sch.orders>', days: 30, limit: 200 }, + ], + [ + '/activity/mentions', + { entityLink: '<#E::table::svc.db.sch.orders>', days: 30, limit: 200 }, + ], ])("should leave an asset's own activity unscoped (%s)", (url, params) => { (getPathNameFromWindowLocation as jest.Mock).mockReturnValue( '/table/svc.db.sch.orders' From 4d4b1ed7fbe837906ba0c009e00c7278fcce24b2 Mon Sep 17 00:00:00 2001 From: Harsh Vador Date: Fri, 4 Dec 2026 18:34:29 +0530 Subject: [PATCH 6/6] test(ui): open a feed list activity card from a click or Enter/Space Only the conversation card's button path had a test, so dropping onActivityClick from the activity card's container props would have gone unnoticed. --- .../FeedPanelBodyV1New.test.tsx | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedPanel/FeedPanelBodyV1New.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedPanel/FeedPanelBodyV1New.test.tsx index badff15cbacd..8fec109559ab 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedPanel/FeedPanelBodyV1New.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedPanel/FeedPanelBodyV1New.test.tsx @@ -84,6 +84,27 @@ describe('FeedPanelBodyV1New', () => { expect(onFeedClick).toHaveBeenCalledWith(conversation); }); + it('opens the activity from a click or Enter/Space on the card', () => { + const onActivityClick = jest.fn(); + render( + + ); + const card = screen.getByTestId('message-container'); + + expect(card).toHaveAttribute('role', 'button'); + expect(card).toHaveAttribute('tabindex', '0'); + + fireEvent.click(screen.getByTestId('card-content')); + fireEvent.keyDown(card, { key: 'Enter' }); + fireEvent.keyDown(card, { key: ' ' }); + + expect(onActivityClick).toHaveBeenCalledTimes(3); + expect(onActivityClick).toHaveBeenCalledWith(activity); + }); + it('opens the conversation only from Reply in the thread panel', () => { const onFeedClick = jest.fn(); render(