Commit 2398bf6c authored by Tomas Vik's avatar Tomas Vik Committed by Kushal Pandya

Remove closeAllFiles action from Web IDE

The only usage of this action was in the tests.
parent 9daed804
......@@ -29,7 +29,7 @@ export default {
},
},
methods: {
...mapActions(['stageChange', 'unstageChange', 'discardFileChanges']),
...mapActions(['unstageChange', 'discardFileChanges']),
showDiscardModal() {
this.$refs.discardModal.show();
},
......
......@@ -55,7 +55,7 @@ export default {
},
},
methods: {
...mapActions(['stageAllChanges', 'unstageAllChanges', 'discardAllChanges']),
...mapActions(['unstageAllChanges', 'discardAllChanges']),
openDiscardModal() {
this.$refs.discardAllModal.show();
},
......
......@@ -20,10 +20,6 @@ export const discardAllChanges = ({ state, commit, dispatch }) => {
commit(types.REMOVE_ALL_CHANGES_FILES);
};
export const closeAllFiles = ({ state, dispatch }) => {
state.openFiles.forEach(file => dispatch('closeFile', file));
};
export const setResizingStatus = ({ commit }, resizing) => {
commit(types.SET_RESIZING_STATUS, resizing);
};
......
......@@ -98,26 +98,6 @@ describe('Multi-file store actions', () => {
});
});
describe('closeAllFiles', () => {
beforeEach(() => {
const f = file('closeAll');
store.state.openFiles.push(f);
store.state.openFiles[0].opened = true;
store.state.entries[f.path] = f;
});
it('closes all open files', done => {
store
.dispatch('closeAllFiles')
.then(() => {
expect(store.state.openFiles.length).toBe(0);
done();
})
.catch(done.fail);
});
});
describe('createTempEntry', () => {
beforeEach(() => {
document.body.innerHTML += '<div class="flash-container"></div>';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment