diff --git a/frontend/src/component/changeRequest/ChangeRequest.test.tsx b/frontend/src/component/changeRequest/ChangeRequest.test.tsx index 7075f523cc90..408a8f5ea1a4 100644 --- a/frontend/src/component/changeRequest/ChangeRequest.test.tsx +++ b/frontend/src/component/changeRequest/ChangeRequest.test.tsx @@ -8,6 +8,7 @@ import { AccessProvider } from '../providers/AccessProvider/AccessProvider'; import { AnnouncerProvider } from '../common/Announcer/AnnouncerProvider/AnnouncerProvider'; import { testServerRoute, testServerSetup } from '../../utils/testServer'; import { UIProviderContainer } from '../providers/UIProvider/UIProviderContainer'; +import { StickyProvider } from 'component/common/Sticky/StickyProvider'; const server = testServerSetup(); @@ -227,12 +228,16 @@ const UnleashUiSetup: FC<{ path: string; pathTemplate: string }> = ({ - - {children}} - /> - + + + {children} + } + /> + + diff --git a/frontend/src/component/changeRequest/ChangeRequestPermissions.test.tsx b/frontend/src/component/changeRequest/ChangeRequestPermissions.test.tsx index a777c092dcb6..21e70c584e89 100644 --- a/frontend/src/component/changeRequest/ChangeRequestPermissions.test.tsx +++ b/frontend/src/component/changeRequest/ChangeRequestPermissions.test.tsx @@ -10,6 +10,7 @@ import { FC } from 'react'; import { IPermission } from '../../interfaces/user'; import { SWRConfig } from 'swr'; import { ProjectMode } from '../project/Project/hooks/useProjectEnterpriseSettingsForm'; +import { StickyProvider } from 'component/common/Sticky/StickyProvider'; const server = testServerSetup(); @@ -186,9 +187,14 @@ const UnleashUiSetup: FC<{ path: string; pathTemplate: string }> = ({ - - - + + + + + diff --git a/frontend/src/setupTests.ts b/frontend/src/setupTests.ts index d15f1080f900..25e7a167846f 100644 --- a/frontend/src/setupTests.ts +++ b/frontend/src/setupTests.ts @@ -2,4 +2,14 @@ import '@testing-library/jest-dom'; import 'whatwg-fetch'; import 'regenerator-runtime'; +class ResizeObserver { + observe() {} + unobserve() {} + disconnect() {} +} + +if (!window.ResizeObserver) { + window.ResizeObserver = ResizeObserver; +} + process.env.TZ = 'UTC';