Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec committed Dec 16, 2024
1 parent 72aad50 commit d232d4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ export default function MergeDragDrop(): ReactElement {
if (isOnlySenseInProtectedWord && !overrideProtection) {
// Case 0: The final sense of a protected word cannot be moved.
return;
}
if (res.destination?.droppableId === trashId) {
} else if (res.destination?.droppableId === trashId) {
// Case 1: The sense was dropped on the trash icon.
if (src.isSenseProtected || isOnlySenseInProtectedWord) {
// Case 1a: Cannot delete a protected sense.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,6 @@ describe("MergeDragDrop", () => {
});
expect(mockSetSidebar).toHaveBeenCalledTimes(1);
const callArg = mockSetSidebar.mock.calls[0][0];
expect(callArg.mergeSenseId).toEqual("word1_senseA");
expect(callArg.senseRef.mergeSenseId).toEqual("word1_senseA");
});
});

0 comments on commit d232d4b

Please sign in to comment.