Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/work_items/router_spec.js')
-rw-r--r--spec/frontend/work_items/router_spec.js39
1 files changed, 6 insertions, 33 deletions
diff --git a/spec/frontend/work_items/router_spec.js b/spec/frontend/work_items/router_spec.js
index b5d54a7c319..79ba31e7012 100644
--- a/spec/frontend/work_items/router_spec.js
+++ b/spec/frontend/work_items/router_spec.js
@@ -2,28 +2,14 @@ import { mount } from '@vue/test-utils';
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createMockApollo from 'helpers/mock_apollo_helper';
-import {
- currentUserResponse,
- workItemAssigneesSubscriptionResponse,
- workItemDatesSubscriptionResponse,
- workItemByIidResponseFactory,
- workItemTitleSubscriptionResponse,
- workItemLabelsSubscriptionResponse,
- workItemMilestoneSubscriptionResponse,
- workItemDescriptionSubscriptionResponse,
-} from 'jest/work_items/mock_data';
+import { currentUserResponse, workItemByIidResponseFactory } from 'jest/work_items/mock_data';
import currentUserQuery from '~/graphql_shared/queries/current_user.query.graphql';
import App from '~/work_items/components/app.vue';
import workItemByIidQuery from '~/work_items/graphql/work_item_by_iid.query.graphql';
-import workItemDatesSubscription from '~/graphql_shared/subscriptions/work_item_dates.subscription.graphql';
-import workItemTitleSubscription from '~/work_items/graphql/work_item_title.subscription.graphql';
-import workItemAssigneesSubscription from '~/work_items/graphql/work_item_assignees.subscription.graphql';
-import workItemLabelsSubscription from 'ee_else_ce/work_items/graphql/work_item_labels.subscription.graphql';
-import workItemMilestoneSubscription from '~/work_items/graphql/work_item_milestone.subscription.graphql';
-import workItemDescriptionSubscription from '~/work_items/graphql/work_item_description.subscription.graphql';
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';
+import workItemUpdatedSubscription from '~/work_items/graphql/work_item_updated.subscription.graphql';
jest.mock('~/behaviors/markdown/render_gfm');
@@ -34,18 +20,9 @@ describe('Work items router', () => {
const workItemQueryHandler = jest.fn().mockResolvedValue(workItemByIidResponseFactory());
const currentUserQueryHandler = jest.fn().mockResolvedValue(currentUserResponse);
- const datesSubscriptionHandler = jest.fn().mockResolvedValue(workItemDatesSubscriptionResponse);
- const titleSubscriptionHandler = jest.fn().mockResolvedValue(workItemTitleSubscriptionResponse);
- const assigneesSubscriptionHandler = jest
+ const workItemUpdatedSubscriptionHandler = jest
.fn()
- .mockResolvedValue(workItemAssigneesSubscriptionResponse);
- const labelsSubscriptionHandler = jest.fn().mockResolvedValue(workItemLabelsSubscriptionResponse);
- const milestoneSubscriptionHandler = jest
- .fn()
- .mockResolvedValue(workItemMilestoneSubscriptionResponse);
- const descriptionSubscriptionHandler = jest
- .fn()
- .mockResolvedValue(workItemDescriptionSubscriptionResponse);
+ .mockResolvedValue({ data: { workItemUpdated: null } });
const createComponent = async (routeArg) => {
const router = createRouter('/work_item');
@@ -56,12 +33,7 @@ describe('Work items router', () => {
const handlers = [
[workItemByIidQuery, workItemQueryHandler],
[currentUserQuery, currentUserQueryHandler],
- [workItemDatesSubscription, datesSubscriptionHandler],
- [workItemTitleSubscription, titleSubscriptionHandler],
- [workItemAssigneesSubscription, assigneesSubscriptionHandler],
- [workItemLabelsSubscription, labelsSubscriptionHandler],
- [workItemMilestoneSubscription, milestoneSubscriptionHandler],
- [workItemDescriptionSubscription, descriptionSubscriptionHandler],
+ [workItemUpdatedSubscription, workItemUpdatedSubscriptionHandler],
];
wrapper = mount(App, {
@@ -81,6 +53,7 @@ describe('Work items router', () => {
WorkItemIteration: true,
WorkItemHealthStatus: true,
WorkItemNotes: true,
+ WorkItemAwardEmoji: true,
},
});
};