import { render, screen } from '@testing-library/react';
import React from 'react';

import { AppContext } from '../../../__mocks__/app-context-mock';
import Page from '../order-create';

describe('Create Order page', () => {
  test('renders page structure', () => {
    const { container } = render(
      <AppContext>
        <Page />
      </AppContext>,
    );

    expect(container).toMatchSnapshot();

    expect(screen.getByTestId('heading')).toBeInTheDocument();
    expect(screen.getByTestId('order-form')).toBeInTheDocument();
  });
});
