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
path: root/spec
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-05-23 12:11:52 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-05-23 12:22:39 +0300
commit1d77de4713f49ccacb6e8819bc70321b5950ab28 (patch)
tree5e7379af4a2af765c7fc4c9a356bd649cfa76edd /spec
parent8c22568d4035712fdba913a96e61f57b65b8aa17 (diff)
Merge branch 'ide-commit-state-bug' into 'master'
Fixed web IDE review & commit editors getting into incorrect state Closes #46392 See merge request gitlab-org/gitlab-ce!19038
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/ide/components/repo_editor_spec.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/javascripts/ide/components/repo_editor_spec.js b/spec/javascripts/ide/components/repo_editor_spec.js
index ff500acd849..d3f80e6f9c0 100644
--- a/spec/javascripts/ide/components/repo_editor_spec.js
+++ b/spec/javascripts/ide/components/repo_editor_spec.js
@@ -346,4 +346,24 @@ describe('RepoEditor', () => {
});
});
});
+
+ it('calls removePendingTab when old file is pending', done => {
+ spyOnProperty(vm, 'shouldHideEditor').and.returnValue(true);
+ spyOn(vm, 'removePendingTab');
+
+ vm.file.pending = true;
+
+ vm
+ .$nextTick()
+ .then(() => {
+ vm.file = file('testing');
+
+ return vm.$nextTick();
+ })
+ .then(() => {
+ expect(vm.removePendingTab).toHaveBeenCalled();
+ })
+ .then(done)
+ .catch(done.fail);
+ });
});