diff options
Diffstat (limited to 'spec/frontend/sidebar/sidebar_assignees_spec.js')
-rw-r--r-- | spec/frontend/sidebar/sidebar_assignees_spec.js | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/spec/frontend/sidebar/sidebar_assignees_spec.js b/spec/frontend/sidebar/sidebar_assignees_spec.js index 5f77e21c1f8..68d20060c37 100644 --- a/spec/frontend/sidebar/sidebar_assignees_spec.js +++ b/spec/frontend/sidebar/sidebar_assignees_spec.js @@ -14,7 +14,7 @@ describe('sidebar assignees', () => { let wrapper; let mediator; let axiosMock; - const createComponent = (realTimeIssueSidebar = false, props) => { + const createComponent = (props) => { wrapper = shallowMount(SidebarAssignees, { propsData: { issuableIid: '1', @@ -25,11 +25,6 @@ describe('sidebar assignees', () => { changing: false, ...props, }, - provide: { - glFeatures: { - realTimeIssueSidebar, - }, - }, // Attaching to document is required because this component emits something from the parent element :/ attachTo: document.body, }); @@ -86,27 +81,17 @@ describe('sidebar assignees', () => { expect(wrapper.find(Assigness).exists()).toBe(true); }); - describe('when realTimeIssueSidebar is turned on', () => { - describe('when issuableType is issue', () => { - it('finds AssigneesRealtime componeont', () => { - createComponent(true); - - expect(wrapper.find(AssigneesRealtime).exists()).toBe(true); - }); - }); - - describe('when issuableType is MR', () => { - it('does not find AssigneesRealtime componeont', () => { - createComponent(true, { issuableType: 'MR' }); + describe('when issuableType is issue', () => { + it('finds AssigneesRealtime component', () => { + createComponent(); - expect(wrapper.find(AssigneesRealtime).exists()).toBe(false); - }); + expect(wrapper.find(AssigneesRealtime).exists()).toBe(true); }); }); - describe('when realTimeIssueSidebar is turned off', () => { - it('does not find AssigneesRealtime', () => { - createComponent(false, { issuableType: 'issue' }); + describe('when issuableType is MR', () => { + it('does not find AssigneesRealtime component', () => { + createComponent({ issuableType: 'MR' }); expect(wrapper.find(AssigneesRealtime).exists()).toBe(false); }); |