Commit 872f200d authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '197343-iscompact' into 'master'

Fix unexpected behaviour of the commit form after committing in Web IDE

Closes #197343

See merge request gitlab-org/gitlab!23238
parents 116c133e 0c333373
......@@ -60,6 +60,11 @@ export default {
);
}
},
lastCommitMsg() {
this.isCompact =
this.currentActivityView !== activityBarViews.commit && this.lastCommitMsg === '';
},
},
methods: {
...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', () => {
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', () => {
......
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