diff options
Diffstat (limited to 'spec/frontend/blob/components/blob_header_default_actions_spec.js')
-rw-r--r-- | spec/frontend/blob/components/blob_header_default_actions_spec.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/frontend/blob/components/blob_header_default_actions_spec.js b/spec/frontend/blob/components/blob_header_default_actions_spec.js index bce65899c43..e321bb41774 100644 --- a/spec/frontend/blob/components/blob_header_default_actions_spec.js +++ b/spec/frontend/blob/components/blob_header_default_actions_spec.js @@ -39,6 +39,9 @@ describe('Blob Header Default Actions', () => { }); describe('renders', () => { + const findCopyButton = () => wrapper.find('[data-testid="copyContentsButton"]'); + const findViewRawButton = () => wrapper.find('[data-testid="viewRawButton"]'); + it('gl-button-group component', () => { expect(btnGroup.exists()).toBe(true); }); @@ -76,7 +79,14 @@ describe('Blob Header Default Actions', () => { hasRenderError: true, }); - expect(wrapper.find('[data-testid="copyContentsButton"]').exists()).toBe(false); + expect(findCopyButton().exists()).toBe(false); + }); + + it('does not render the copy and view raw button if isBinary is set to true', () => { + createComponent({ isBinary: true }); + + expect(findCopyButton().exists()).toBe(false); + expect(findViewRawButton().exists()).toBe(false); }); }); }); |