Skip to content

Commit d6d8c9a

Browse files
update test
Signed-off-by: Adhitya Mamallan <[email protected]>
1 parent 10114a6 commit d6d8c9a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { render, screen, userEvent } from '@/test-utils/rtl';
33
import {
44
completedActivityTaskEvents,
55
scheduleActivityTaskEvent,
6+
startActivityTaskEvent,
67
} from '@/views/workflow-history/__fixtures__/workflow-history-activity-events';
78
import {
89
mockActivityEventGroup,
@@ -204,10 +205,10 @@ describe(WorkflowHistoryEventGroup.name, () => {
204205
);
205206
});
206207

207-
it('calls toggleIsEventExpanded when panel is toggled', async () => {
208+
it('calls toggleIsEventExpanded for each event when panel is toggled', async () => {
208209
const eventGroup: HistoryEventsGroup = {
209210
...mockActivityEventGroupWithMetadata,
210-
events: [scheduleActivityTaskEvent],
211+
events: [scheduleActivityTaskEvent, startActivityTaskEvent],
211212
};
212213

213214
const toggleIsEventExpanded = jest.fn();
@@ -217,9 +218,7 @@ describe(WorkflowHistoryEventGroup.name, () => {
217218
const headerLabel = screen.getByText('Mock event');
218219
await user.click(headerLabel);
219220

220-
expect(toggleIsEventExpanded).toHaveBeenCalledWith(
221-
scheduleActivityTaskEvent.eventId
222-
);
221+
expect(toggleIsEventExpanded).toHaveBeenCalledTimes(2);
223222
});
224223

225224
it('handles missing event group time gracefully', () => {

0 commit comments

Comments
 (0)