1 import GlobalInlineMessageBarReducer from 'app/globalInlineMessageBar/GlobalInlineMessageBarReducer.js';
3 globalInlineMessageBarActionTypes
4 } from 'app/globalInlineMessageBar/GlobalInlineMessageBarConstants.js';
7 } from 'utils/GlobalConstants.js'
9 describe('GlobalInlineMessageBarReducerTests', () => {
10 it('Action Type: SET_GLOBAL_MESSAGE', () => {
12 type: globalInlineMessageBarActionTypes.SET_GLOBAL_MESSAGE,
14 msgText: 'some error message here',
15 msgSeverity: MESSAGE_LEVEL_WARNING
19 state = GlobalInlineMessageBarReducer(state, action);
20 expect(state).toEqual({
21 feedbackMsgText: action.data.msgText,
22 feedbackMsgSeverity: action.data.msgSeverity
26 it('Action Type: CLEAR_GLOBAL_MESSAGE', () => {
28 type: globalInlineMessageBarActionTypes.CLEAR_GLOBAL_MESSAGE
31 feedbackMsgText: 'some error message here',
32 feedbackMsgSeverity: MESSAGE_LEVEL_WARNING
34 state = GlobalInlineMessageBarReducer(state, action);
35 expect(state).toEqual({
37 feedbackMsgSeverity: ''