From 397eb358629b8a8471eaf9bdb9416bffeaad6106 Mon Sep 17 00:00:00 2001
From: "Andrew Winget (Standard)" <scipioaffricanus@gmail.com>
Date: Fri, 15 Feb 2019 16:18:37 -0800
Subject: [PATCH] fix action tests

---
 __tests__/src/actions/window.test.js   |  8 +++++---
 __tests__/src/reducers/windows.test.js | 23 +----------------------
 2 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/__tests__/src/actions/window.test.js b/__tests__/src/actions/window.test.js
index db979cca5..f4e805f96 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 fffc6f1de..7244830d3 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: {
-- 
GitLab