diff options
Diffstat (limited to 'spec/frontend/work_items/router_spec.js')
-rw-r--r-- | spec/frontend/work_items/router_spec.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/spec/frontend/work_items/router_spec.js b/spec/frontend/work_items/router_spec.js index 982f9f71f9e..b503d819435 100644 --- a/spec/frontend/work_items/router_spec.js +++ b/spec/frontend/work_items/router_spec.js @@ -1,14 +1,12 @@ import { mount } from '@vue/test-utils'; import Vue from 'vue'; import VueApollo from 'vue-apollo'; -import workItemWeightSubscription from 'ee_component/work_items/graphql/work_item_weight.subscription.graphql'; import createMockApollo from 'helpers/mock_apollo_helper'; import { workItemAssigneesSubscriptionResponse, workItemDatesSubscriptionResponse, workItemResponseFactory, workItemTitleSubscriptionResponse, - workItemWeightSubscriptionResponse, workItemLabelsSubscriptionResponse, workItemMilestoneSubscriptionResponse, workItemDescriptionSubscriptionResponse, @@ -25,6 +23,8 @@ import CreateWorkItem from '~/work_items/pages/create_work_item.vue'; import WorkItemsRoot from '~/work_items/pages/work_item_root.vue'; import { createRouter } from '~/work_items/router'; +jest.mock('~/behaviors/markdown/render_gfm'); + describe('Work items router', () => { let wrapper; @@ -33,7 +33,6 @@ describe('Work items router', () => { const workItemQueryHandler = jest.fn().mockResolvedValue(workItemResponseFactory()); const datesSubscriptionHandler = jest.fn().mockResolvedValue(workItemDatesSubscriptionResponse); const titleSubscriptionHandler = jest.fn().mockResolvedValue(workItemTitleSubscriptionResponse); - const weightSubscriptionHandler = jest.fn().mockResolvedValue(workItemWeightSubscriptionResponse); const assigneesSubscriptionHandler = jest .fn() .mockResolvedValue(workItemAssigneesSubscriptionResponse); @@ -61,10 +60,6 @@ describe('Work items router', () => { [workItemDescriptionSubscription, descriptionSubscriptionHandler], ]; - if (IS_EE) { - handlers.push([workItemWeightSubscription, weightSubscriptionHandler]); - } - wrapper = mount(App, { apolloProvider: createMockApollo(handlers), router, @@ -72,6 +67,13 @@ describe('Work items router', () => { fullPath: 'full-path', issuesListPath: 'full-path/-/issues', hasIssueWeightsFeature: false, + hasIterationsFeature: false, + hasOkrsFeature: false, + hasIssuableHealthStatusFeature: false, + }, + stubs: { + WorkItemWeight: true, + WorkItemIteration: true, }, }); }; |