Skip to content

Commit 46f0f7f

Browse files
committed
added test cases
1 parent 3280694 commit 46f0f7f

File tree

3 files changed

+2
-27
lines changed

3 files changed

+2
-27
lines changed

src/components/UI/Form/EmojiInput/Editor.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { fireEvent, render, screen } from '@testing-library/react';
1+
import { render } from '@testing-library/react';
22
import { Editor } from './Editor';
33
import { LexicalWrapper } from 'common/LexicalWrapper';
44

src/containers/HSM/HSM.test.tsx

+1-24
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ vi.mock('lexical-beautiful-mentions', async (importOriginal) => {
3232
};
3333
});
3434

35-
// const user = userEvent.setup()
36-
3735
describe('Edit mode', () => {
3836
test('HSM form is loaded correctly in edit mode', async () => {
3937
const MOCKS = [...mocks, getHSMTemplateTypeText, getHSMTemplateTypeText];
@@ -130,7 +128,7 @@ describe('Add mode', () => {
130128
const inputs = screen.getAllByRole('textbox');
131129

132130
fireEvent.change(inputs[0], { target: { value: 'element_name' } });
133-
const lexicalEditor = inputs[2] as HTMLInputElement;
131+
const lexicalEditor = inputs[2];
134132

135133
await user.click(lexicalEditor);
136134
await user.tab();
@@ -145,7 +143,6 @@ describe('Add mode', () => {
145143
fireEvent.click(screen.getByTestId('bold-icon'));
146144

147145
fireEvent.click(screen.getByText('Allow meta to re-categorize template?'));
148-
screen.debug(document, Infinity);
149146

150147
fireEvent.click(screen.getByTestId('italic-icon'));
151148
fireEvent.click(screen.getByTestId('strikethrough-icon'));
@@ -355,24 +352,4 @@ describe('Add mode', () => {
355352
expect(screen.getAllByRole('combobox')[1]).toHaveValue('account_balance');
356353
});
357354
});
358-
359-
test('formatting should work properly', async () => {
360-
render(template);
361-
362-
await waitFor(() => {
363-
expect(screen.getByText('Add a new HSM Template')).toBeInTheDocument();
364-
});
365-
366-
const inputs = screen.getAllByRole('textbox');
367-
const lexicalEditor = inputs[2];
368-
fireEvent.input(lexicalEditor, { data: 'How are you' });
369-
370-
fireEvent.click(screen.getByTestId('bold-icon'));
371-
372-
screen.debug(document, Infinity);
373-
374-
await waitFor(() => {
375-
expect(screen.getByText('How are you')).toBeInTheDocument();
376-
});
377-
});
378355
});

src/containers/InteractiveMessage/InteractiveMessage.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,6 @@ export const InteractiveMessage = () => {
546546
textArea: true,
547547
helperText: t('You can also use variables in message enter @ to see the available list'),
548548
handleChange: (value: any) => {
549-
console.log('Val', value);
550-
551549
setBody(value);
552550
},
553551
inputProp: {

0 commit comments

Comments
 (0)