{"size": 1227, "ext": "js", "max_stars_repo_path": "forms-flow-web/src/_tests_/test-components/test-insights/insight.test.js", "max_stars_repo_name": "andrepestana-aot/forms-flow-ai", "max_stars_repo_stars_event_min_datetime": "2020-04-16T20:26:18.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:39:50.000Z", "max_issues_repo_path": "forms-flow-web/src/_tests_/test-components/test-insights/insight.test.js", "max_issues_repo_name": "andrepestana-aot/forms-flow-ai", "max_issues_repo_issues_event_min_datetime": "2020-06-05T21:30:27.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-30T04:53:25.000Z", "max_forks_repo_path": "forms-flow-web/src/_tests_/test-components/test-insights/insight.test.js", "max_forks_repo_name": "andrepestana-aot/forms-flow-ai", "max_forks_repo_forks_event_min_datetime": "2020-04-15T18:54:51.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-29T04:58:49.000Z"}
{"max_stars_count": 132, "max_issues_count": 102, "max_forks_count": 91, "avg_line_length": 43.8214285714, "max_line_length": 102, "alphanum_fraction": 0.7188264059}
import React from 'react';
import { render, screen } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';
import {Provider} from "react-redux";
import { appState } from "../../test-redux-states/redux-state-sample";
import Insights from '../../../components/Insights/Insights';
import StoreService from '../../../services/StoreService';
import { mock1 } from './constant';
const store = StoreService.configureStore();

test('Render Insight  Component with insights prop passed', () => {

    render(<Provider store={store}><Insights isDashboardLoading={appState.insights.isDashboardLoading}
        isInsightLoading={appState.insights.isInsightLoading}
        dashboards={appState.insights.dashboardsList}
        activeDashboard={appState.insights.dashboardDetail}/>
        </Provider>);
        expect(screen.getByTestId('loading-component')).toBeInTheDocument();

});
test('Render Insight  Component with insights prop passed', () => {
    render(<Provider store={store}><Insights isDashboardLoading={mock1.isDashboardLoading}
        isInsightLoading={mock1.isInsightLoading}
        dashboards={mock1.dashboardsList}
        activeDashboard={mock1.dashboardDetail}/>
        </Provider>);
});
