Commit 0e8124ce authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'web-ide-remove-dead-code' into 'master'

Web IDE - remove unused actions (mappings)

See merge request gitlab-org/gitlab!33824
parents ab8d6ed4 2398bf6c
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
}, },
}, },
methods: { methods: {
...mapActions(['stageChange', 'unstageChange', 'discardFileChanges']), ...mapActions(['unstageChange', 'discardFileChanges']),
showDiscardModal() { showDiscardModal() {
this.$refs.discardModal.show(); this.$refs.discardModal.show();
}, },
......
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
}, },
}, },
methods: { methods: {
...mapActions(['stageAllChanges', 'unstageAllChanges', 'discardAllChanges']), ...mapActions(['unstageAllChanges', 'discardAllChanges']),
openDiscardModal() { openDiscardModal() {
this.$refs.discardAllModal.show(); this.$refs.discardAllModal.show();
}, },
......
...@@ -19,10 +19,6 @@ export const discardAllChanges = ({ state, commit, dispatch }) => { ...@@ -19,10 +19,6 @@ export const discardAllChanges = ({ state, commit, dispatch }) => {
commit(types.REMOVE_ALL_CHANGES_FILES); commit(types.REMOVE_ALL_CHANGES_FILES);
}; };
export const closeAllFiles = ({ state, dispatch }) => {
state.openFiles.forEach(file => dispatch('closeFile', file));
};
export const setResizingStatus = ({ commit }, resizing) => { export const setResizingStatus = ({ commit }, resizing) => {
commit(types.SET_RESIZING_STATUS, resizing); commit(types.SET_RESIZING_STATUS, resizing);
}; };
......
...@@ -100,26 +100,6 @@ describe('Multi-file store actions', () => { ...@@ -100,26 +100,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', () => { describe('createTempEntry', () => {
beforeEach(() => { beforeEach(() => {
document.body.innerHTML += '<div class="flash-container"></div>'; 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