diff --git a/__tests__/src/actions/window.test.js b/__tests__/src/actions/window.test.js index db979cca521c80f6e5b500c7ec9f135ed7ca2068..f4e805f9601db7770f6a2f229f281de4a0a42cee 100644 --- a/__tests__/src/actions/window.test.js +++ b/__tests__/src/actions/window.test.js @@ -120,12 +120,14 @@ describe('window actions', () => { expect(mockDispatch).toHaveBeenCalledWith({ type: ActionTypes.TOGGLE_WINDOW_SIDE_BAR_PANEL, windowId, panelType: 'closed', }); + }); + }); describe('setWindowSize', () => { it('returns the appropriate action type', () => { const id = 'abc123'; const expectedAction = { - type: ActionTypes.SET_WINDOW_THUMBNAIL_POSITION, + type: ActionTypes.SET_WINDOW_SIZE, payload: { windowId: id, size: { @@ -136,11 +138,11 @@ describe('window actions', () => { }, }, }; - expect(actions.setWindowThumbnailPosition(id, { + expect(actions.setWindowSize(id, { x: 20, y: 20, width: 200, - width: 200, + height: 200, })).toEqual(expectedAction); }); }); diff --git a/__tests__/src/reducers/windows.test.js b/__tests__/src/reducers/windows.test.js index fffc6f1debde822fa4ccc5aac9ae8a5b5e67e822..7244830d3243cfad8e8891192f8b38606f809dc0 100644 --- a/__tests__/src/reducers/windows.test.js +++ b/__tests__/src/reducers/windows.test.js @@ -231,28 +231,6 @@ describe('windows reducer', () => { }); }); - it('should handle UPDATE_VIEWPORT', () => { - expect(windowsReducer({ - abc123: { - id: 'abc123', - }, - def456: { - id: 'def456', - }, - }, { - type: ActionTypes.UPDATE_VIEWPORT, - windowId: 'abc123', - payload: { x: 0, y: 1, zoom: 0.5 }, - })).toEqual({ - abc123: { - id: 'abc123', - viewer: { x: 0, y: 1, zoom: 0.5 }, - }, - def456: { - id: 'def456', - }, - }); - }); it('should handle SET_WINDOW_SIZE', () => { expect(windowsReducer({ abc123: { @@ -285,6 +263,7 @@ describe('windows reducer', () => { }, }); }); + it('should handle UPDATE_WINDOW_POSITION', () => { expect(windowsReducer({ abc123: {