Merge branch '14013-upload-collection-files-using-webdav' into 14014-create-collectio...
[arvados.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 './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 services = createServices("/arvados/v1");
21         services.authService.getUuid = jest.fn().mockReturnValueOnce('test');
22     const store = configureStore(createBrowserHistory(), services);
23     ReactDOM.render(
24         <MuiThemeProvider theme={CustomTheme}>
25             <Provider store={store}>
26                 <ConnectedRouter history={history}>
27                     <Workbench authService={services.authService}/>
28                 </ConnectedRouter>
29             </Provider>
30         </MuiThemeProvider>,
31     div);
32     ReactDOM.unmountComponentAtNode(div);
33 });