diff --git a/__tests__/actionCreators/resources.test.js b/__tests__/actionCreators/resources.test.js index ebb9c7853..cc3f82351 100644 --- a/__tests__/actionCreators/resources.test.js +++ b/__tests__/actionCreators/resources.test.js @@ -85,9 +85,10 @@ describe('newResource', () => { await store.dispatch(newResource(resourceTemplateId)) const actions = store.getActions() expect(actions[0]).toEqual({ type: 'CLEAR_RESOURCE_TEMPLATES' }) - expect(actions[1]).toEqual({ type: 'SET_RESOURCE', payload: { [resourceTemplateId]: {} } }) - expect(actions[2]).toEqual({ type: 'RETRIEVE_RESOURCE_TEMPLATE_STARTED', payload: resourceTemplateId }) - expect(actions[3]).toEqual({ type: 'SET_RESOURCE_TEMPLATE', payload: resourceTemplateResponse.response.body }) + expect(actions[1]).toEqual({ type: 'CLEAR_RESOURCE_URI_MESSAGE' }) + expect(actions[2]).toEqual({ type: 'SET_RESOURCE', payload: { [resourceTemplateId]: {} } }) + expect(actions[3]).toEqual({ type: 'RETRIEVE_RESOURCE_TEMPLATE_STARTED', payload: resourceTemplateId }) + expect(actions[4]).toEqual({ type: 'SET_RESOURCE_TEMPLATE', payload: resourceTemplateResponse.response.body }) }) }) @@ -114,10 +115,11 @@ describe('existingResource', () => { await store.dispatch(existingResource(resource, 'http://localhost:8080/repository/stanford/888ea64d-f471-41bf-9d33-c9426ab83b5c')) const actions = store.getActions() - expect(actions[0]).toEqual({ type: 'SET_RESOURCE', payload: { [resourceTemplateId]: {} } }) - expect(actions[1]).toEqual({ type: 'SET_BASE_URL', payload: 'http://localhost:8080/repository/stanford/888ea64d-f471-41bf-9d33-c9426ab83b5c' }) - expect(actions[2]).toEqual({ type: 'RETRIEVE_RESOURCE_TEMPLATE_STARTED', payload: undefined }) - expect(actions[3]).toEqual({ type: 'SET_RESOURCE_TEMPLATE', payload: resourceTemplateResponse.response.body }) + expect(actions[0]).toEqual({ type: 'CLEAR_RESOURCE_URI_MESSAGE' }) + expect(actions[1]).toEqual({ type: 'SET_RESOURCE', payload: { [resourceTemplateId]: {} } }) + expect(actions[2]).toEqual({ type: 'SET_BASE_URL', payload: 'http://localhost:8080/repository/stanford/888ea64d-f471-41bf-9d33-c9426ab83b5c' }) + expect(actions[3]).toEqual({ type: 'RETRIEVE_RESOURCE_TEMPLATE_STARTED', payload: undefined }) + expect(actions[4]).toEqual({ type: 'SET_RESOURCE_TEMPLATE', payload: resourceTemplateResponse.response.body }) }) }) diff --git a/__tests__/reducers/inputs.test.js b/__tests__/reducers/inputs.test.js index 15c99dc21..994309cf4 100644 --- a/__tests__/reducers/inputs.test.js +++ b/__tests__/reducers/inputs.test.js @@ -3,7 +3,7 @@ import { removeMyItem, setItemsOrSelections, setBaseURL, validate, showGroupChooser, closeGroupChooser, showRdfPreview, - showResourceURIMessage, clearingResourceURIMessage, + showResourceURIMessage, clearResourceURIMessage, } from 'reducers/inputs' import { @@ -365,15 +365,15 @@ describe('showResourceURIMessage', () => { }) }) -describe('clearingResourceURIMessage', () => { +describe('clearResourceURIMessage', () => { it('turns off the Resource URI message display', () => { initialState.editor.resourceURIMessage = { show: true, uri: 'this message will disapear', } - const result = clearingResourceURIMessage(initialState, { - type: 'CLEARING_RESOURCE_URI_MESSAGE', + const result = clearResourceURIMessage(initialState, { + type: 'CLEAR_RESOURCE_URI_MESSAGE', }) expect(result.editor.resourceURIMessage.show).toBe(false)