diff options
Diffstat (limited to 'spec/frontend/jobs/components/sidebar_detail_row_spec.js')
-rw-r--r-- | spec/frontend/jobs/components/sidebar_detail_row_spec.js | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/spec/frontend/jobs/components/sidebar_detail_row_spec.js b/spec/frontend/jobs/components/sidebar_detail_row_spec.js deleted file mode 100644 index 8d2680608ab..00000000000 --- a/spec/frontend/jobs/components/sidebar_detail_row_spec.js +++ /dev/null @@ -1,55 +0,0 @@ -import { GlLink } from '@gitlab/ui'; -import { shallowMount } from '@vue/test-utils'; -import SidebarDetailRow from '~/jobs/components/sidebar_detail_row.vue'; - -describe('Sidebar detail row', () => { - let wrapper; - - const title = 'this is the title'; - const value = 'this is the value'; - const helpUrl = 'https://docs.gitlab.com/runner/register/index.html'; - - const findHelpLink = () => wrapper.findComponent(GlLink); - - const createComponent = (props) => { - wrapper = shallowMount(SidebarDetailRow, { - propsData: { - ...props, - }, - }); - }; - - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - - describe('with title/value and without helpUrl', () => { - beforeEach(() => { - createComponent({ title, value }); - }); - - it('should render the provided title and value', () => { - expect(wrapper.text()).toBe(`${title}: ${value}`); - }); - - it('should not render the help link', () => { - expect(findHelpLink().exists()).toBe(false); - }); - }); - - describe('when helpUrl provided', () => { - beforeEach(() => { - createComponent({ - helpUrl, - title, - value, - }); - }); - - it('should render the help link', () => { - expect(findHelpLink().exists()).toBe(true); - expect(findHelpLink().attributes('href')).toBe(helpUrl); - }); - }); -}); |