@@ -32,8 +32,6 @@ vi.mock('lexical-beautiful-mentions', async (importOriginal) => {
32
32
} ;
33
33
} ) ;
34
34
35
- // const user = userEvent.setup()
36
-
37
35
describe ( 'Edit mode' , ( ) => {
38
36
test ( 'HSM form is loaded correctly in edit mode' , async ( ) => {
39
37
const MOCKS = [ ...mocks , getHSMTemplateTypeText , getHSMTemplateTypeText ] ;
@@ -130,7 +128,7 @@ describe('Add mode', () => {
130
128
const inputs = screen . getAllByRole ( 'textbox' ) ;
131
129
132
130
fireEvent . change ( inputs [ 0 ] , { target : { value : 'element_name' } } ) ;
133
- const lexicalEditor = inputs [ 2 ] as HTMLInputElement ;
131
+ const lexicalEditor = inputs [ 2 ] ;
134
132
135
133
await user . click ( lexicalEditor ) ;
136
134
await user . tab ( ) ;
@@ -145,7 +143,6 @@ describe('Add mode', () => {
145
143
fireEvent . click ( screen . getByTestId ( 'bold-icon' ) ) ;
146
144
147
145
fireEvent . click ( screen . getByText ( 'Allow meta to re-categorize template?' ) ) ;
148
- screen . debug ( document , Infinity ) ;
149
146
150
147
fireEvent . click ( screen . getByTestId ( 'italic-icon' ) ) ;
151
148
fireEvent . click ( screen . getByTestId ( 'strikethrough-icon' ) ) ;
@@ -355,24 +352,4 @@ describe('Add mode', () => {
355
352
expect ( screen . getAllByRole ( 'combobox' ) [ 1 ] ) . toHaveValue ( 'account_balance' ) ;
356
353
} ) ;
357
354
} ) ;
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
- } ) ;
378
355
} ) ;
0 commit comments