load item to panelDetails and display data
[arvados-workbench2.git] / src / views / workbench / workbench.test.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import * as React from 'react';
6 import * as ReactDOM from 'react-dom';
7 import Workbench from '../../views/workbench/workbench';
8 import { Provider } from "react-redux";
9 import configureStore from "../../store/store";
10 import createBrowserHistory from "history/createBrowserHistory";
11 import { ConnectedRouter } from "react-router-redux";
12 import { MuiThemeProvider } from '@material-ui/core/styles';
13 import { CustomTheme } from '../../common/custom-theme';
14
15 const history = createBrowserHistory();
16
17 it('renders without crashing', () => {
18     const div = document.createElement('div');
19     const store = configureStore({
20         projects: {
21             items: [],
22             currentItemId: ""
23         },
24         collections: [],
25         router: { location: null },
26         auth: {},
27         sidePanel: []
28     }, createBrowserHistory());
29     ReactDOM.render(
30         <MuiThemeProvider theme={CustomTheme}>
31             <Provider store={store}>
32                 <ConnectedRouter history={history}>
33                     <Workbench/>
34                 </ConnectedRouter>
35             </Provider>
36         </MuiThemeProvider>,
37     div);
38     ReactDOM.unmountComponentAtNode(div);
39 });