Skip to content

Commit ac6a607

Browse files
committed
fix tests
1 parent 48ae45d commit ac6a607

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

redisinsight/ui/src/slices/tests/browser/rejson.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
mockedStore,
88
mockStore,
99
} from 'uiSrc/utils/test-utils'
10+
import { EditorType } from 'uiSrc/slices/interfaces'
1011
import successMessages from 'uiSrc/components/notifications/success-messages'
1112
import { GetRejsonRlResponseDto } from 'apiSrc/modules/browser/rejson-rl/dto'
1213
import reducer, {
@@ -29,6 +30,7 @@ import reducer, {
2930
setReJSONDataAction,
3031
appendReJSONArrayItemAction,
3132
removeReJSONKeyAction,
33+
setEditorType,
3234
} from '../../browser/rejson'
3335
import {
3436
addErrorNotification,
@@ -405,6 +407,7 @@ describe('rejson slice', () => {
405407
const expectedActions = [
406408
loadRejsonBranch(),
407409
loadRejsonBranchSuccess(responsePayload.data),
410+
setEditorType(EditorType.Default), // and always set editor type to default
408411
]
409412
expect(store.getActions()).toEqual(expectedActions)
410413
})
@@ -432,6 +435,7 @@ describe('rejson slice', () => {
432435
loadRejsonBranch(),
433436
loadRejsonBranchFailure(responsePayload.response.data.message),
434437
addErrorNotification(responsePayload as AxiosError),
438+
setEditorType(EditorType.Default), // and always set editor type to default
435439
]
436440
expect(store.getActions()).toEqual(expectedActions)
437441
})

0 commit comments

Comments
 (0)