merge master
[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 import { createServices } from "../../services/services";
15
16 const history = createBrowserHistory();
17
18 it('renders without crashing', () => {
19     const div = document.createElement('div');
20     const store = configureStore(createBrowserHistory(), createServices("/arvados/v1"));
21     ReactDOM.render(
22         <MuiThemeProvider theme={CustomTheme}>
23             <Provider store={store}>
24                 <ConnectedRouter history={history}>
25                     <Workbench/>
26                 </ConnectedRouter>
27             </Provider>
28         </MuiThemeProvider>,
29     div);
30     ReactDOM.unmountComponentAtNode(div);
31 });