Skip to content

Commit b7ce4af

Browse files
authored
fix(issues): Remove duplicate clear assignee call (#83665)
1 parent c3fa6fd commit b7ce4af

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

static/app/components/assigneeSelectorDropdown.spec.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ describe('AssigneeSelectorDropdown', () => {
427427
})
428428
)
429429
);
430+
expect(assignMock).toHaveBeenCalledTimes(1);
431+
assignMock.mockClear();
432+
430433
rerender(
431434
<AssigneeSelectorDropdown
432435
group={assignedGroup}
@@ -442,13 +445,14 @@ describe('AssigneeSelectorDropdown', () => {
442445

443446
// api was called with empty string, clearing assignment
444447
await waitFor(() =>
445-
expect(assignMock).toHaveBeenLastCalledWith(
448+
expect(assignMock).toHaveBeenCalledWith(
446449
'/organizations/org-slug/issues/1337/',
447450
expect.objectContaining({
448451
data: {assignedTo: '', assignedBy: 'assignee_selector'},
449452
})
450453
)
451454
);
455+
expect(assignMock).toHaveBeenCalledTimes(1);
452456
});
453457

454458
it('filters user by email and selects with keyboard', async () => {

static/app/components/assigneeSelectorDropdown.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,6 @@ export default function AssigneeSelectorDropdown({
572572
? `${group.assignedTo?.type === 'user' ? 'user:' : 'team:'}${group.assignedTo.id}`
573573
: ''
574574
}
575-
onClear={() => handleSelect(null)}
576575
menuTitle={t('Assignee')}
577576
searchPlaceholder="Search users or teams..."
578577
size="sm"

0 commit comments

Comments
 (0)