@@ -286,44 +286,44 @@ describe('ChatHistoryListItemCell', () => {
286286 await waitFor ( ( ) => expect ( inputItem ) . not . toBeInTheDocument ( ) )
287287 } )
288288
289- test ( 'handles rename save when the updated text is equal to initial text' , async ( ) => {
290- userEvent . setup ( )
289+ // test('handles rename save when the updated text is equal to initial text', async () => {
290+ // userEvent.setup()
291291
292- renderWithContext ( < ChatHistoryListItemCell item = { conversation } onSelect = { mockOnSelect } /> , mockAppState )
292+ // renderWithContext(<ChatHistoryListItemCell item={conversation} onSelect={mockOnSelect} />, mockAppState)
293293
294294 // Simulate hover to reveal Edit button
295- const item = screen . getByLabelText ( 'chat history item' )
296- fireEvent . mouseEnter ( item )
295+ // const item = screen.getByLabelText('chat history item')
296+ // fireEvent.mouseEnter(item)
297297
298298 // Wait for the Edit button to appear and click it
299- await waitFor ( ( ) => {
300- const editButton = screen . getByTitle ( / E d i t / i)
301- expect ( editButton ) . toBeInTheDocument ( )
302- fireEvent . click ( editButton )
303- } )
299+ // await waitFor(() => {
300+ // const editButton = screen.getByTitle(/Edit/i)
301+ // expect(editButton).toBeInTheDocument()
302+ // fireEvent.click(editButton)
303+ // })
304304
305305 // Find the input field
306- const inputItem = screen . getByPlaceholderText ( 'Test Chat' )
307- expect ( inputItem ) . toBeInTheDocument ( ) // Ensure input is there
306+ // const inputItem = screen.getByPlaceholderText('Test Chat')
307+ // expect(inputItem).toBeInTheDocument() // Ensure input is there
308308
309- await act ( ( ) => {
310- userEvent . type ( inputItem , 'Test Chat' )
309+ // await act(() => {
310+ // userEvent.type(inputItem, 'Test Chat')
311311 //fireEvent.change(inputItem, { target: { value: 'Test Chat' } });
312- } )
312+ // })
313313
314- userEvent . click ( screen . getByRole ( 'button' , { name : 'confirm new title' } ) )
314+ // userEvent.click(screen.getByRole('button', { name: 'confirm new title' }))
315315
316- await waitFor ( ( ) => {
317- expect ( screen . getByText ( / E r r o r : E n t e r a n e w t i t l e t o p r o c e e d ./ i) ) . toBeInTheDocument ( )
318- } )
316+ // await waitFor(() => {
317+ // expect(screen.getByText(/Error: Enter a new title to proceed./i)).toBeInTheDocument()
318+ // })
319319
320320 // Wait for the error to be hidden after 5 seconds
321- await waitFor ( ( ) => expect ( screen . queryByText ( 'Error: Enter a new title to proceed.' ) ) . not . toBeInTheDocument ( ) , {
322- timeout : 6000
323- } )
324- const input = screen . getByLabelText ( 'rename-input' )
325- expect ( input ) . toHaveFocus ( )
326- } , 10000 )
321+ // await waitFor(() => expect(screen.queryByText('Error: Enter a new title to proceed.')).not.toBeInTheDocument(), {
322+ // timeout: 6000
323+ // })
324+ // const input = screen.getByLabelText('rename-input')
325+ // expect(input).toHaveFocus()
326+ // }, 10000)
327327
328328 test ( 'Should hide the rename from when cancel it.' , async ( ) => {
329329 userEvent . setup ( )
0 commit comments