Skip to content

Commit 833daa1

Browse files
address copilot comments
Signed-off-by: Adhitya Mamallan <[email protected]>
1 parent 409bdaf commit 833daa1

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/views/workflow-history-v2/workflow-history-event-group/__tests__/workflow-history-event-group.test.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ describe(WorkflowHistoryEventGroup.name, () => {
394394
expect(screen.getByText('Summary')).toBeInTheDocument();
395395
});
396396

397-
it('does not show summary tab when summaryDetailsEntries is empty', () => {
397+
it('does not show summary tab when only one event is present in the group', () => {
398398
const mockEventDetails: EventDetailsEntries = [
399399
{
400400
key: 'input',
@@ -431,11 +431,19 @@ describe(WorkflowHistoryEventGroup.name, () => {
431431
},
432432
],
433433
],
434-
summaryDetailsEntries: [],
434+
summaryDetailsEntries: [
435+
[
436+
scheduleActivityTaskEvent.eventId!,
437+
{
438+
eventLabel: 'Scheduled',
439+
eventDetails: mockEventDetails,
440+
},
441+
],
442+
],
435443
},
436444
});
437445

438-
// Summary tab should not appear when summaryDetailsEntries is empty
446+
// Summary tab should not appear when there is only one event
439447
expect(screen.queryByText('Summary')).not.toBeInTheDocument();
440448
});
441449

src/views/workflow-history-v2/workflow-history-event-group/workflow-history-event-group.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ export default function WorkflowHistoryEventGroup({
7777
...(summaryDetailsEntries.length > 0
7878
? [
7979
getSummaryTabContentEntry({
80-
groupId: eventGroup.firstEventId ?? '',
80+
groupId: eventGroup.firstEventId ?? 'unknown',
8181
summaryDetails: summaryDetailsEntries.flatMap(
82-
([_, { eventDetails }]) => eventDetails
82+
([_eventId, { eventDetails }]) => eventDetails
8383
),
8484
}),
8585
]

0 commit comments

Comments
 (0)