diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-06-05 21:57:51 +0000 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-06-05 21:57:51 +0000 |
commit | 5ef0e1c3cd599854c89cbdb32b7b9626443445ea (patch) | |
tree | 8f46c89921202eb6920bafa45811381ea59f6a32 /spec/javascripts | |
parent | 6f2cd9bcf18874f7afb23a1a77f3fd390a0d3e88 (diff) | |
parent | c07ee6415a316a87c7afa71fa881e7cc03b97343 (diff) | |
download | gitlab-ce-5ef0e1c3cd599854c89cbdb32b7b9626443445ea.tar.gz |
Merge branch '47049-performance-modal' into 'master'
Resolve "Performance bar modal is hard to read"
Closes #47049
See merge request gitlab-org/gitlab-ce!19334
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/vue_shared/components/gl_modal_spec.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/javascripts/vue_shared/components/gl_modal_spec.js b/spec/javascripts/vue_shared/components/gl_modal_spec.js index 85cb1b90fc6..23be8d93b81 100644 --- a/spec/javascripts/vue_shared/components/gl_modal_spec.js +++ b/spec/javascripts/vue_shared/components/gl_modal_spec.js @@ -190,4 +190,37 @@ describe('GlModal', () => { }); }); }); + + describe('handling sizes', () => { + it('should render modal-sm', () => { + vm = mountComponent(modalComponent, { + modalSize: 'sm', + }); + + expect(vm.$el.querySelector('.modal-dialog').classList.contains('modal-sm')).toEqual(true); + }); + + it('should render modal-lg', () => { + vm = mountComponent(modalComponent, { + modalSize: 'lg', + }); + + expect(vm.$el.querySelector('.modal-dialog').classList.contains('modal-lg')).toEqual(true); + }); + + it('should not add modal size classes when md size is passed', () => { + vm = mountComponent(modalComponent, { + modalSize: 'md', + }); + + expect(vm.$el.querySelector('.modal-dialog').classList.contains('modal-md')).toEqual(false); + }); + + it('should not add modal size classes by default', () => { + vm = mountComponent(modalComponent, {}); + + expect(vm.$el.querySelector('.modal-dialog').classList.contains('modal-sm')).toEqual(false); + expect(vm.$el.querySelector('.modal-dialog').classList.contains('modal-lg')).toEqual(false); + }); + }); }); |