import { renderWithClient } from '../../../utils/test/react-query';
import { MemoryRouter } from 'react-router-dom';
import { mockFailureResponse } from '../../../mocks/server';
import LoginForm from '../form';

describe('LoginForm component', () => {
  test('successful render component', async () => {
    mockFailureResponse();
    const result = renderWithClient(<LoginForm />, MemoryRouter);
    expect(await result.findByTestId('login-form')).toBeInTheDocument();
    expect(await result.findByText('ورود')).toBeInTheDocument();
  });
});
