diff options
Diffstat (limited to 'spec/frontend/vue_shared/issuable/show/components')
4 files changed, 11 insertions, 12 deletions
diff --git a/spec/frontend/vue_shared/issuable/show/components/issuable_body_spec.js b/spec/frontend/vue_shared/issuable/show/components/issuable_body_spec.js index 1a93838b03f..7c582360637 100644 --- a/spec/frontend/vue_shared/issuable/show/components/issuable_body_spec.js +++ b/spec/frontend/vue_shared/issuable/show/components/issuable_body_spec.js @@ -159,7 +159,6 @@ describe('IssuableBody', () => { expect(titleEl.exists()).toBe(true); expect(titleEl.props()).toMatchObject({ issuable: issuableBodyProps.issuable, - statusBadgeClass: issuableBodyProps.statusBadgeClass, statusIcon: issuableBodyProps.statusIcon, enableEdit: issuableBodyProps.enableEdit, }); diff --git a/spec/frontend/vue_shared/issuable/show/components/issuable_header_spec.js b/spec/frontend/vue_shared/issuable/show/components/issuable_header_spec.js index 544db891a13..e00bb184535 100644 --- a/spec/frontend/vue_shared/issuable/show/components/issuable_header_spec.js +++ b/spec/frontend/vue_shared/issuable/show/components/issuable_header_spec.js @@ -1,4 +1,4 @@ -import { GlIcon, GlAvatarLabeled } from '@gitlab/ui'; +import { GlBadge, GlIcon, GlAvatarLabeled } from '@gitlab/ui'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures'; import IssuableHeader from '~/vue_shared/issuable/show/components/issuable_header.vue'; @@ -69,7 +69,7 @@ describe('IssuableHeader', () => { describe('template', () => { it('renders issuable status icon and text', () => { createComponent(); - const statusBoxEl = wrapper.findByTestId('status'); + const statusBoxEl = wrapper.findComponent(GlBadge); const statusIconEl = statusBoxEl.findComponent(GlIcon); expect(statusBoxEl.exists()).toBe(true); diff --git a/spec/frontend/vue_shared/issuable/show/components/issuable_show_root_spec.js b/spec/frontend/vue_shared/issuable/show/components/issuable_show_root_spec.js index 8b027f990a2..f56064ed8e1 100644 --- a/spec/frontend/vue_shared/issuable/show/components/issuable_show_root_spec.js +++ b/spec/frontend/vue_shared/issuable/show/components/issuable_show_root_spec.js @@ -47,7 +47,6 @@ describe('IssuableShowRoot', () => { describe('template', () => { const { - statusBadgeClass, statusIcon, statusIconClass, enableEdit, @@ -69,7 +68,6 @@ describe('IssuableShowRoot', () => { expect(issuableHeader.exists()).toBe(true); expect(issuableHeader.props()).toMatchObject({ issuableState: state, - statusBadgeClass, statusIcon, statusIconClass, blocked, @@ -91,7 +89,6 @@ describe('IssuableShowRoot', () => { expect(issuableBody.exists()).toBe(true); expect(issuableBody.props()).toMatchObject({ issuable: mockIssuable, - statusBadgeClass, statusIcon, enableEdit, enableAutocomplete, diff --git a/spec/frontend/vue_shared/issuable/show/components/issuable_title_spec.js b/spec/frontend/vue_shared/issuable/show/components/issuable_title_spec.js index 11e3302d409..5aa67667033 100644 --- a/spec/frontend/vue_shared/issuable/show/components/issuable_title_spec.js +++ b/spec/frontend/vue_shared/issuable/show/components/issuable_title_spec.js @@ -1,4 +1,4 @@ -import { GlIcon, GlButton, GlIntersectionObserver } from '@gitlab/ui'; +import { GlIcon, GlBadge, GlButton, GlIntersectionObserver } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import { nextTick } from 'vue'; import { createMockDirective, getBinding } from 'helpers/vue_mock_directive'; @@ -40,7 +40,7 @@ describe('IssuableTitle', () => { describe('methods', () => { describe('handleTitleAppear', () => { it('sets value of `stickyTitleVisible` prop to false', () => { - wrapper.find(GlIntersectionObserver).vm.$emit('appear'); + wrapper.findComponent(GlIntersectionObserver).vm.$emit('appear'); expect(wrapper.vm.stickyTitleVisible).toBe(false); }); @@ -48,7 +48,7 @@ describe('IssuableTitle', () => { describe('handleTitleDisappear', () => { it('sets value of `stickyTitleVisible` prop to true', () => { - wrapper.find(GlIntersectionObserver).vm.$emit('disappear'); + wrapper.findComponent(GlIntersectionObserver).vm.$emit('disappear'); expect(wrapper.vm.stickyTitleVisible).toBe(true); }); @@ -70,14 +70,14 @@ describe('IssuableTitle', () => { expect(titleEl.exists()).toBe(true); expect(titleEl.html()).toBe( - '<h1 dir="auto" data-testid="title" class="title qa-title"><b>Sample</b> title</h1>', + '<h1 dir="auto" data-testid="title" class="title qa-title gl-font-size-h-display"><b>Sample</b> title</h1>', ); wrapperWithTitle.destroy(); }); it('renders edit button', () => { - const editButtonEl = wrapper.find(GlButton); + const editButtonEl = wrapper.findComponent(GlButton); const tooltip = getBinding(editButtonEl.element, 'gl-tooltip'); expect(editButtonEl.exists()).toBe(true); @@ -97,7 +97,10 @@ describe('IssuableTitle', () => { const stickyHeaderEl = wrapper.find('[data-testid="header"]'); expect(stickyHeaderEl.exists()).toBe(true); - expect(stickyHeaderEl.find(GlIcon).props('name')).toBe(issuableTitleProps.statusIcon); + expect(stickyHeaderEl.findComponent(GlBadge).props('variant')).toBe('success'); + expect(stickyHeaderEl.findComponent(GlIcon).props('name')).toBe( + issuableTitleProps.statusIcon, + ); expect(stickyHeaderEl.text()).toContain('Open'); expect(stickyHeaderEl.text()).toContain(issuableTitleProps.issuable.title); }); |