Skip to content

Commit

Permalink
test: add blockId to mock data
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Oct 23, 2024
1 parent d64bfa5 commit 9bb02c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/editors/containers/TextEditor/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jest.mock('../../data/redux', () => ({
showRawEditor: jest.fn(state => ({ showRawEditor: state })),
images: jest.fn(state => ({ images: state })),
isLibrary: jest.fn(state => ({ isLibrary: state })),
blockId: jest.fn(state => ({ blockId: state })),
learningContextId: jest.fn(state => ({ learningContextId: state })),
},
requests: {
Expand Down
2 changes: 1 addition & 1 deletion src/editors/data/redux/app/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const app = createSlice({
blockValue: payload,
blockTitle: payload.data.display_name,
}),
setBlockId: (state, { payload }) => ({...state, blockId: payload,}),
setBlockId: (state, { payload }) => ({ ...state, blockId: payload }),
setStudioView: (state, { payload }) => ({ ...state, studioView: payload }),
setBlockContent: (state, { payload }) => ({ ...state, blockContent: payload }),
setBlockTitle: (state, { payload }) => ({ ...state, blockTitle: payload }),
Expand Down
1 change: 1 addition & 0 deletions src/editors/data/redux/app/reducer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe('app reducer', () => {
['setUnitUrl', 'unitUrl'],
['setStudioView', 'studioView'],
['setBlockContent', 'blockContent'],
['setBlockId', 'blockId'],
['setBlockTitle', 'blockTitle'],
['setSaveResponse', 'saveResponse'],
['setVideos', 'videos'],
Expand Down

0 comments on commit 9bb02c6

Please sign in to comment.