From c61a1059f71e2d30be0c76395f8d6ed3a1026abc Mon Sep 17 00:00:00 2001 From: Teo Koon Peng Date: Mon, 26 Aug 2024 08:53:37 +0000 Subject: [PATCH] fix tests Signed-off-by: Teo Koon Peng --- packages/dashboard/src/utils/test-utils.test.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/dashboard/src/utils/test-utils.test.tsx b/packages/dashboard/src/utils/test-utils.test.tsx index 6a2d0b2d7..15979e284 100644 --- a/packages/dashboard/src/utils/test-utils.test.tsx +++ b/packages/dashboard/src/utils/test-utils.test.tsx @@ -39,10 +39,12 @@ import { AppController, AppControllerProvider } from '../hooks/use-app-controlle import { AuthenticatorProvider } from '../hooks/use-authenticator'; import { Resources, ResourcesProvider } from '../hooks/use-resources'; import { RmfApiProvider } from '../hooks/use-rmf-api'; +import { SettingsProvider } from '../hooks/use-settings'; import { TaskRegistry, TaskRegistryProvider } from '../hooks/use-task-registry'; import { UserProfileProvider } from '../hooks/use-user-profile'; import { UserProfile } from '../services/authenticator'; import { RmfApi } from '../services/rmf-api'; +import { Settings } from '../services/settings'; import StubAuthenticator from '../services/stub-authenticator'; export const superUser: UserProfile = { @@ -147,6 +149,10 @@ export const TestProviders = ({ profile = superUser, children }: TestProviderPro () => ({ taskDefinitions: [], pickupZones: [], cartIds: [] }), [], ); + const settings = React.useMemo( + () => ({ themeMode: 'default', microAppSettings: {} }), + [], + ); const rmfApi = React.useMemo(() => new MockRmfApi(), []); const appController = React.useMemo(() => makeMockAppController(), []); @@ -155,9 +161,11 @@ export const TestProviders = ({ profile = superUser, children }: TestProviderPro - - {children} - + + + {children} + +