summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-01-16 11:56:01 +0000
committerLuke Bennett <lukeeeebennettplus@gmail.com>2018-01-17 16:27:51 +0000
commitf1b9a9cb28209d5cacd0e7a4b9132dab7900dcf7 (patch)
treeccbeb9910221f40bb2acb9b632f222a62f0e4cb2 /spec
parent6fefbf2e4b8e388470cfa8bb4eb7079817f85a5c (diff)
downloadgitlab-ce-f1b9a9cb28209d5cacd0e7a4b9132dab7900dcf7.tar.gz
Merge branch 'mr-status-box-update' into 'master'
Fixed merge request status badge not updating after merging See merge request gitlab-org/gitlab-ce!16470
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/merge_request_spec.js7
-rw-r--r--spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js6
2 files changed, 8 insertions, 5 deletions
diff --git a/spec/javascripts/merge_request_spec.js b/spec/javascripts/merge_request_spec.js
index 2f02c11482f..f2a0cb691bf 100644
--- a/spec/javascripts/merge_request_spec.js
+++ b/spec/javascripts/merge_request_spec.js
@@ -63,8 +63,8 @@ import IssuablesHelper from '~/helpers/issuables_helper';
beforeEach(() => {
loadFixtures('merge_requests/merge_request_with_task_list.html.raw');
this.el = document.querySelector('.js-issuable-actions');
- const merge = new MergeRequest();
- merge.hideCloseButton();
+ new MergeRequest(); // eslint-disable-line no-new
+ MergeRequest.hideCloseButton();
});
it('hides the dropdown close item and selects the next item', () => {
@@ -83,8 +83,7 @@ import IssuablesHelper from '~/helpers/issuables_helper';
beforeEach(() => {
loadFixtures('merge_requests/merge_request_of_current_user.html.raw');
this.el = document.querySelector('.js-issuable-actions');
- const merge = new MergeRequest();
- merge.hideCloseButton();
+ MergeRequest.hideCloseButton();
});
it('hides the close button', () => {
diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
index 8d84e67ac2d..11858e45386 100644
--- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
+++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
@@ -371,6 +371,10 @@ describe('MRWidgetReadyToMerge', () => {
});
});
+ beforeEach(() => {
+ loadFixtures('merge_requests/merge_request_of_current_user.html.raw');
+ });
+
it('should call start and stop polling when MR merged', (done) => {
spyOn(eventHub, '$emit');
spyOn(vm.service, 'poll').and.returnValue(returnPromise('merged'));
@@ -400,7 +404,7 @@ describe('MRWidgetReadyToMerge', () => {
setTimeout(() => {
const statusBox = document.querySelector('.status-box');
- expect(statusBox.classList.contains('status-box-mr-merged')).toBeTruthy();
+ expect(statusBox.classList.contains('status-box-merged')).toBeTruthy();
expect(statusBox.textContent).toContain('Merged');
done();