diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-07 00:12:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-07 00:12:45 +0300 |
commit | 8ec004d6d8d92f00d0598e94ede4d31ab1e8f18e (patch) | |
tree | 525dcb81832e5ad142cc1f2aeff2f38c51f80aa4 /spec/frontend/vue_merge_request_widget | |
parent | e22c3819ad2321a0cf825877fe3b60e41268c5b3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_merge_request_widget')
-rw-r--r-- | spec/frontend/vue_merge_request_widget/components/states/mr_widget_ready_to_merge_spec.js | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_ready_to_merge_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_ready_to_merge_spec.js index 080e3af5254..1e4e089e7c1 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_ready_to_merge_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_ready_to_merge_spec.js @@ -180,6 +180,26 @@ describe('ReadyToMerge', () => { expect(wrapper.vm.status).toEqual('failed'); }); }); + + describe('status icon', () => { + it('defaults to tick icon', () => { + createComponent({ mr: { mergeable: true } }); + + expect(wrapper.vm.iconClass).toEqual('success'); + }); + + it('shows tick for success status', () => { + createComponent({ mr: { pipeline: { status: 'SUCCESS' }, mergeable: true } }); + + expect(wrapper.vm.iconClass).toEqual('success'); + }); + + it('shows tick for pending status', () => { + createComponent({ mr: { pipeline: { active: true }, mergeable: true } }); + + expect(wrapper.vm.iconClass).toEqual('success'); + }); + }); }); describe('merge button text', () => { @@ -189,18 +209,18 @@ describe('ReadyToMerge', () => { expect(findMergeButton().text()).toBe('Merge'); }); - it('should return "Set auto-merge" when the MWPS auto merge strategy is available', () => { + it('should return "Merge when pipeline succeeds" when the MWPS auto merge strategy is available', () => { createComponent({ mr: { preferredAutoMergeStrategy: MWPS_MERGE_STRATEGY }, }); - expect(findMergeButton().text()).toBe('Set auto-merge'); + expect(findMergeButton().text()).toBe('Merge when pipeline succeeds'); }); - it('should return set auto-merge', () => { + it('should return Merge when pipeline succeeds', () => { createComponent({ mr: { preferredAutoMergeStrategy: MWPS_MERGE_STRATEGY } }); - expect(findMergeButton().text()).toBe('Set auto-merge'); + expect(findMergeButton().text()).toBe('Merge when pipeline succeeds'); }); }); |