import React from "react";
import { injectIntl } from 'react-intl';
import '@testing-library/jest-dom';
import { Provider } from 'react-redux';
import history from "../../../utils/history";
import { configureStore } from '@capillarytech/vulcan-react-sdk/utils';
import { initialReducer } from "../../../initialReducer";
import NewCallTask from '../index';
import mockData from './mockData'
import {
    render,
  } from '../../../utils/test-utils';
import { Router } from "express";
const ComponentToRender = injectIntl(NewCallTask);

const renderComponent = (props) => {
  const store = configureStore({}, initialReducer, history);
  return render(
    <Router>
      <Provider store={store}>
        <ComponentToRender {...props} />
      </Provider>
    </Router>,
  );
};

describe("test for NewCallTask", () => {
  const onCallTaskSubmit = jest.fn();
  const props = {
    ...mockData,
    onCallTaskSubmit,
  };
 
  it("New call task", async () => {
    renderComponent(props);
  });
});
