From acdebc65dae0dc0316b5b146a1ddb13a44109290 Mon Sep 17 00:00:00 2001 From: Ben Wheeler <wheeler.benjamin@gmail.com> Date: Wed, 28 Nov 2018 15:14:33 -0800 Subject: [PATCH] fixed test for auto saving --- test/unit/util/project-saver-hoc.test.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/unit/util/project-saver-hoc.test.jsx b/test/unit/util/project-saver-hoc.test.jsx index 4af09047c..5da449805 100644 --- a/test/unit/util/project-saver-hoc.test.jsx +++ b/test/unit/util/project-saver-hoc.test.jsx @@ -16,7 +16,9 @@ describe('projectSaverHOC', () => { beforeEach(() => { store = mockStore({ scratchGui: { - projectState: {} + projectChanged: false, + projectState: {}, + projectTitle: 'Scratch Project' } }); vm = new VM(); @@ -31,6 +33,7 @@ describe('projectSaverHOC', () => { isShowingWithId canSave={false} isCreatingNew={false} + isShowingSaveable={false} // set explicitly because it relies on ownProps.canSave isShowingWithoutId={false} isUpdating={false} loadingState={LoadingState.SHOWING_WITH_ID} @@ -40,7 +43,8 @@ describe('projectSaverHOC', () => { /> ); mounted.setProps({ - canSave: true + canSave: true, + isShowingSaveable: true }); expect(mockedUpdateProject).toHaveBeenCalled(); }); -- GitLab