X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/73da4aae95f9186c71533e3c26cecce23f52fc02..d53a08ea0cc9a9af1a3071969d41165e8a6ff5d5:/src/views/workbench/workbench.test.tsx

diff --git a/src/views/workbench/workbench.test.tsx b/src/views/workbench/workbench.test.tsx
index b1657bc3..fe5dff8a 100644
--- a/src/views/workbench/workbench.test.tsx
+++ b/src/views/workbench/workbench.test.tsx
@@ -2,25 +2,35 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
-import * as ReactDOM from 'react-dom';
-import Workbench from '../../views/workbench/workbench';
+import React from 'react';
+import ReactDOM from 'react-dom';
+import { WorkbenchPanel } from './workbench';
 import { Provider } from "react-redux";
-import configureStore from "../../store/store";
-import createBrowserHistory from "history/createBrowserHistory";
+import { configureStore } from "store/store";
+import { createBrowserHistory } from "history";
 import { ConnectedRouter } from "react-router-redux";
+import { MuiThemeProvider } from '@material-ui/core/styles';
+import { CustomTheme } from 'common/custom-theme';
+import { createServices } from "services/services";
+import 'jest-localstorage-mock';
+
+jest.mock('views-components/baner/banner', () => ({ Banner: () => 'Banner' }))
 
 const history = createBrowserHistory();
 
 it('renders without crashing', () => {
     const div = document.createElement('div');
-    const store = configureStore({ projects: [], router: { location: null } }, createBrowserHistory());
+    const services = createServices("/arvados/v1");
+	services.authService.getUuid = jest.fn().mockReturnValueOnce('test');
+    const store = configureStore(createBrowserHistory(), services);
     ReactDOM.render(
-        <Provider store={store}>
-            <ConnectedRouter history={history}>
-                <Workbench/>
-            </ConnectedRouter>
-        </Provider>,
+        <MuiThemeProvider theme={CustomTheme}>
+            <Provider store={store}>
+                <ConnectedRouter history={history}>
+                    <WorkbenchPanel />
+                </ConnectedRouter>
+            </Provider>
+        </MuiThemeProvider>,
     div);
     ReactDOM.unmountComponentAtNode(div);
 });
