diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-07-20 13:15:35 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-07-20 16:20:05 +0100 |
commit | 8e74f14c26b9df6a4fdc4fb79322b13b06c3c509 (patch) | |
tree | 771e2937cb76b3c119874e6d67ab94e504953b82 | |
parent | 570e7713c76b247c6da886dc60edce10657558b1 (diff) | |
download | gitlab-ce-8e74f14c26b9df6a4fdc4fb79322b13b06c3c509.tar.gz |
Follow up after review: Clear Vuex actions and mutations
-rw-r--r-- | app/assets/javascripts/reports/store/actions.js | 5 | ||||
-rw-r--r-- | app/assets/javascripts/reports/store/mutations.js | 1 | ||||
-rw-r--r-- | spec/javascripts/reports/store/mutations_spec.js | 4 |
3 files changed, 2 insertions, 8 deletions
diff --git a/app/assets/javascripts/reports/store/actions.js b/app/assets/javascripts/reports/store/actions.js index 72069489d20..6ce0a00a03e 100644 --- a/app/assets/javascripts/reports/store/actions.js +++ b/app/assets/javascripts/reports/store/actions.js @@ -16,6 +16,7 @@ export const clearEtagPoll = () => { export const stopPolling = () => { if (eTagPoll) eTagPoll.stop(); }; + export const restartPolling = () => { if (eTagPoll) eTagPoll.restart(); }; @@ -60,9 +61,7 @@ export const fetchReports = ({ state, dispatch }) => { export const receiveReportsSuccess = ({ commit }, response) => commit(types.RECEIVE_REPORTS_SUCCESS, response); -export const receiveReportsError = ({ commit }) => { - commit(types.RECEIVE_REPORTS_ERROR); -}; +export const receiveReportsError = ({ commit }) => commit(types.RECEIVE_REPORTS_ERROR); // prevent babel-plugin-rewire from generating an invalid default during karma tests export default () => {}; diff --git a/app/assets/javascripts/reports/store/mutations.js b/app/assets/javascripts/reports/store/mutations.js index 9487b8d073a..3851f2f5799 100644 --- a/app/assets/javascripts/reports/store/mutations.js +++ b/app/assets/javascripts/reports/store/mutations.js @@ -12,7 +12,6 @@ export default { [types.RECEIVE_REPORTS_SUCCESS](state, response) { state.isLoading = false; - state.hasError = false; Vue.set(state.summary, 'total', response.summary.total); Vue.set(state.summary, 'resolved', response.summary.resolved); diff --git a/spec/javascripts/reports/store/mutations_spec.js b/spec/javascripts/reports/store/mutations_spec.js index 90d2203cc66..3e0b15438c3 100644 --- a/spec/javascripts/reports/store/mutations_spec.js +++ b/spec/javascripts/reports/store/mutations_spec.js @@ -74,10 +74,6 @@ describe('Reports Store Mutations', () => { expect(stateCopy.isLoading).toEqual(false); }); - it('should reset hasError', () => { - expect(stateCopy.hasError).toEqual(false); - }); - it('should set summary counts', () => { expect(stateCopy.summary.total).toEqual(mockedResponse.summary.total); expect(stateCopy.summary.resolved).toEqual(mockedResponse.summary.resolved); |