Commit 0c333373 authored by Himanshu Kapoor's avatar Himanshu Kapoor

Fix issue with commit form not collapsing

Commit form should be collapsed after a commit in Web IDE.
parent 56d2fcfd
...@@ -60,6 +60,11 @@ export default { ...@@ -60,6 +60,11 @@ export default {
); );
} }
}, },
lastCommitMsg() {
this.isCompact =
this.currentActivityView !== activityBarViews.commit && this.lastCommitMsg === '';
},
}, },
methods: { methods: {
...mapActions(['updateActivityBarView']), ...mapActions(['updateActivityBarView']),
......
---
title: Fix unexpected behaviour of the commit form after committing in Web IDE
merge_request: 23238
author:
type: fixed
...@@ -76,6 +76,25 @@ describe('IDE commit form', () => { ...@@ -76,6 +76,25 @@ describe('IDE commit form', () => {
done(); done();
}); });
}); });
it('collapses if lastCommitMsg is set to empty and current view is not commit view', done => {
store.state.lastCommitMsg = 'abc';
store.state.currentActivityView = activityBarViews.edit;
vm.$nextTick(() => {
// if commit message is set, form is uncollapsed
expect(vm.isCompact).toBe(false);
store.state.lastCommitMsg = '';
vm.$nextTick(() => {
// collapsed when set to empty
expect(vm.isCompact).toBe(true);
done();
});
});
});
}); });
describe('full', () => { describe('full', () => {
......
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