-
Notifications
You must be signed in to change notification settings - Fork 19
/
step-resources-feature.spec.tsx
32 lines (31 loc) · 1.1 KB
/
step-resources-feature.spec.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import ResizeObserver from '__tests__/utils/resize-observer'
import { render } from '__tests__/utils/setup-jest'
import { ServiceTypeEnum } from '@qovery/shared/enums'
import { ApplicationContainerCreateContext } from '../page-application-create-feature'
import StepResourcesFeature from './step-resources-feature'
describe('PageApplicationCreateResourcesFeature', () => {
it('should render successfully', () => {
window.ResizeObserver = ResizeObserver
const { baseElement } = render(
<ApplicationContainerCreateContext.Provider
value={{
currentStep: 1,
setCurrentStep: jest.fn(),
generalData: { name: 'test', serviceType: ServiceTypeEnum.APPLICATION },
setGeneralData: jest.fn(),
resourcesData: {
memory: 512,
cpu: [0.5],
instances: [1, 12],
},
setResourcesData: jest.fn(),
setPortData: jest.fn(),
portData: undefined,
}}
>
<StepResourcesFeature />
</ApplicationContainerCreateContext.Provider>
)
expect(baseElement).toBeTruthy()
})
})