Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Bigelow <sbigelow@gitlab.com>2019-04-02 22:27:34 +0300
committerSam Bigelow <sbigelow@gitlab.com>2019-04-04 19:08:35 +0300
commit2571856fc52eecf0d39f517905e14e7a9d2267da (patch)
tree09f4c2879cc292959fe69a20f714cf552f0cb99e /spec/frontend/ide
parentcde8456cd433c258e9100fe33f10f62a3b32ee4e (diff)
Shortcut to create MR in web IDE
Before the user had to choose between committing to a new branch, committing to a new branch AND creating an MR, or committing to the current branch regardless of whether or not it already has an MR. This commit separates the creation of an MR from whether or not they commit to an existing or new branch
Diffstat (limited to 'spec/frontend/ide')
-rw-r--r--spec/frontend/ide/stores/modules/commit/mutations_spec.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/spec/frontend/ide/stores/modules/commit/mutations_spec.js b/spec/frontend/ide/stores/modules/commit/mutations_spec.js
index 5de7a281d34..40d47aaad03 100644
--- a/spec/frontend/ide/stores/modules/commit/mutations_spec.js
+++ b/spec/frontend/ide/stores/modules/commit/mutations_spec.js
@@ -18,7 +18,7 @@ describe('IDE commit module mutations', () => {
describe('UPDATE_COMMIT_ACTION', () => {
it('updates commitAction', () => {
- mutations.UPDATE_COMMIT_ACTION(state, 'testing');
+ mutations.UPDATE_COMMIT_ACTION(state, { commitAction: 'testing' });
expect(state.commitAction).toBe('testing');
});
@@ -39,4 +39,20 @@ describe('IDE commit module mutations', () => {
expect(state.submitCommitLoading).toBeTruthy();
});
});
+
+ describe('TOGGLE_SHOULD_CREATE_MR', () => {
+ it('changes shouldCreateMR to true when initial state is false', () => {
+ state.shouldCreateMR = false;
+ mutations.TOGGLE_SHOULD_CREATE_MR(state);
+
+ expect(state.shouldCreateMR).toBe(true);
+ });
+
+ it('changes shouldCreateMR to false when initial state is true', () => {
+ state.shouldCreateMR = true;
+ mutations.TOGGLE_SHOULD_CREATE_MR(state);
+
+ expect(state.shouldCreateMR).toBe(false);
+ });
+ });
});