diff --git a/src/reducers/timeout.js b/src/reducers/timeout.js index 958352c64bfc0a6cd533cc3ac851b646a0a232c9..5ed5b7be3c16845abee19fe52f13d3b516acfd88 100644 --- a/src/reducers/timeout.js +++ b/src/reducers/timeout.js @@ -1,4 +1,4 @@ -const SET_AUTOSAVE_TIMEOUT_ID = 'projectTitle/SET_AUTOSAVE_TIMEOUT_ID'; +const SET_AUTOSAVE_TIMEOUT_ID = 'timeout/SET_AUTOSAVE_TIMEOUT_ID'; const initialState = { autoSaveTimeoutId: null diff --git a/test/unit/util/project-saver-hoc.test.jsx b/test/unit/util/project-saver-hoc.test.jsx index fe28bdb91984c39d7c0b7bb86959941bacda4c7e..90dc63367cffbfe72be92e2371c1ad11a76d8ee7 100644 --- a/test/unit/util/project-saver-hoc.test.jsx +++ b/test/unit/util/project-saver-hoc.test.jsx @@ -18,7 +18,10 @@ describe('projectSaverHOC', () => { scratchGui: { projectChanged: false, projectState: {}, - projectTitle: 'Scratch Project' + projectTitle: 'Scratch Project', + timeout: { + autoSaveTimeoutId: null + } } }); vm = new VM(); @@ -358,19 +361,16 @@ describe('projectSaverHOC', () => { /> ); mounted.setProps({ - projectChanged: true + projectChanged: true, + reduxProjectTitle: 'a' }); mounted.setProps({ - projectChanged: false - }); - mounted.setProps({ - projectChanged: true + projectChanged: true, + reduxProjectTitle: 'b' }); mounted.setProps({ - projectChanged: false - }); - mounted.setProps({ - projectChanged: true + projectChanged: true, + reduxProjectTitle: 'c' }); // Fast-forward until all timers have been executed jest.runAllTimers();