|
2 | 2 | import React from 'react'; |
3 | 3 | import { render, screen } from '@testing-library/react'; |
4 | 4 | import { ToolType } from '@deephaven/dashboard-core-plugins'; |
| 5 | +import { ApiContext } from '@deephaven/jsapi-bootstrap'; |
5 | 6 | import dh from '@deephaven/jsapi-shim'; |
6 | 7 | import type { |
7 | 8 | IdeConnection, |
@@ -69,27 +70,29 @@ function renderAppMainContainer({ |
69 | 70 | plugins = new Map(), |
70 | 71 | } = {}) { |
71 | 72 | return render( |
72 | | - <AppMainContainer |
73 | | - dashboardData={dashboardData as AppDashboardData} |
74 | | - layoutStorage={layoutStorage as LayoutStorage} |
75 | | - saveWorkspace={saveWorkspace} |
76 | | - updateDashboardData={updateDashboardData} |
77 | | - updateWorkspaceData={updateWorkspaceData} |
78 | | - user={user} |
79 | | - workspace={workspace as Workspace} |
80 | | - workspaceStorage={workspaceStorage} |
81 | | - activeTool={activeTool} |
82 | | - setActiveTool={setActiveTool} |
83 | | - setDashboardIsolatedLinkerPanelId={setDashboardIsolatedLinkerPanelId} |
84 | | - client={client} |
85 | | - serverConfigValues={serverConfigValues} |
86 | | - dashboardOpenedPanelMaps={dashboardOpenedPanelMaps} |
87 | | - connection={connection} |
88 | | - session={(session as unknown) as IdeSession} |
89 | | - sessionConfig={sessionConfig} |
90 | | - match={match} |
91 | | - plugins={plugins} |
92 | | - /> |
| 73 | + <ApiContext.Provider value={dh}> |
| 74 | + <AppMainContainer |
| 75 | + dashboardData={dashboardData as AppDashboardData} |
| 76 | + layoutStorage={layoutStorage as LayoutStorage} |
| 77 | + saveWorkspace={saveWorkspace} |
| 78 | + updateDashboardData={updateDashboardData} |
| 79 | + updateWorkspaceData={updateWorkspaceData} |
| 80 | + user={user} |
| 81 | + workspace={workspace as Workspace} |
| 82 | + workspaceStorage={workspaceStorage} |
| 83 | + activeTool={activeTool} |
| 84 | + setActiveTool={setActiveTool} |
| 85 | + setDashboardIsolatedLinkerPanelId={setDashboardIsolatedLinkerPanelId} |
| 86 | + client={client} |
| 87 | + serverConfigValues={serverConfigValues} |
| 88 | + dashboardOpenedPanelMaps={dashboardOpenedPanelMaps} |
| 89 | + connection={connection} |
| 90 | + session={(session as unknown) as IdeSession} |
| 91 | + sessionConfig={sessionConfig} |
| 92 | + match={match} |
| 93 | + plugins={plugins} |
| 94 | + /> |
| 95 | + </ApiContext.Provider> |
93 | 96 | ); |
94 | 97 | } |
95 | 98 | let mockProp = {}; |
|
0 commit comments