import { MemoryRouter } from 'react-router-dom';
import { renderWithClient } from '../../../utils/test/react-query';
import { expectPageTestIds, expectPageTitle } from '../../../utils/test/expects';
import RegisterPage, { REGISTER_PAGE_TITLE } from '../index';

describe('RegisterPage component', () => {
  test('successful render component', async () => {
    const result = renderWithClient(<RegisterPage />, MemoryRouter);
    expectPageTitle(REGISTER_PAGE_TITLE);
    await expectPageTestIds(result);
    expect(await result.findByTestId('register')).toBeInTheDocument();
  });
});
