Skip to content

Commit e4aeb1a

Browse files
committed
PR fix
1 parent b86ce47 commit e4aeb1a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

front/src/pods/trainer/components/new-text.component.spec.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,21 @@ describe('NewTextComponent unit tests', () => {
5757
// Assert
5858
expect(handleAppendTrainerText).not.toHaveBeenCalled();
5959
});
60+
61+
it('should not handle any text when there is not entered text and pressing ctrl + enter', async () => {
62+
// Arrange
63+
const handleAppendTrainerText = jest.fn();
64+
65+
// Act
66+
render(
67+
<NewTextComponent handleAppendTrainerText={handleAppendTrainerText} />
68+
);
69+
70+
const inputText = screen.getByRole('textbox');
71+
72+
await act(async () => userEvent.type(inputText, '{ctrl}{enter}{/ctrl}'));
73+
74+
// Assert
75+
expect(handleAppendTrainerText).not.toHaveBeenCalled();
76+
});
6077
});

0 commit comments

Comments
 (0)