import { renderWithClient } from '../../../../utils/test/react-query';
import { mockedMobile } from '../../../../mocks/data';
import SmsKey from '../index';

describe('SmsKey component', () => {
  afterEach(() => jest.resetAllMocks());

  test('successful render component', async () => {
    const result = renderWithClient(
      <SmsKey mobile={mockedMobile} onSubmit={jest.fn()} onError={jest.fn()} onBack={jest.fn()} />
    );
    expect(await result.findByTestId('smskey-content')).toBeInTheDocument();
    expect(await result.findByTestId('smskey-mobile-view')).toBeInTheDocument();
    expect(await result.findByTestId('smskey-form')).toBeInTheDocument();
    expect(await result.findByTestId('smskey-resend-view')).toBeInTheDocument();
  });
});
