diff options
Diffstat (limited to 'spec/frontend/ide/components/pipelines/list_spec.js')
-rw-r--r-- | spec/frontend/ide/components/pipelines/list_spec.js | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/spec/frontend/ide/components/pipelines/list_spec.js b/spec/frontend/ide/components/pipelines/list_spec.js index c1744fefe20..a1fbfd96c31 100644 --- a/spec/frontend/ide/components/pipelines/list_spec.js +++ b/spec/frontend/ide/components/pipelines/list_spec.js @@ -1,4 +1,5 @@ -import { shallowMount, createLocalVue } from '@vue/test-utils'; +import { shallowMount } from '@vue/test-utils'; +import Vue from 'vue'; import Vuex from 'vuex'; import { GlLoadingIcon, GlTab } from '@gitlab/ui'; import { TEST_HOST } from 'helpers/test_constants'; @@ -8,8 +9,7 @@ import JobsList from '~/ide/components/jobs/list.vue'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; import IDEServices from '~/ide/services'; -const localVue = createLocalVue(); -localVue.use(Vuex); +Vue.use(Vuex); jest.mock('~/ide/services', () => ({ pingUsage: jest.fn(), @@ -59,9 +59,6 @@ describe('IDE pipelines list', () => { failedStages: failedStagesGetterMock, pipelineFailed: () => false, }, - methods: { - fetchLatestPipeline: jest.fn(), - }, }, }, }); @@ -69,7 +66,6 @@ describe('IDE pipelines list', () => { const createComponent = (state = {}, pipelinesState = {}) => { wrapper = shallowMount(List, { - localVue, store: createStore(state, pipelinesState), }); }; @@ -165,11 +161,7 @@ describe('IDE pipelines list', () => { const isLoadingJobs = true; createComponent({}, { ...withLatestPipelineState, stages, isLoadingJobs }); - const jobProps = wrapper - .findAll(GlTab) - .at(0) - .find(JobsList) - .props(); + const jobProps = wrapper.findAll(GlTab).at(0).find(JobsList).props(); expect(jobProps.stages).toBe(stages); expect(jobProps.loading).toBe(isLoadingJobs); }); @@ -180,11 +172,7 @@ describe('IDE pipelines list', () => { const isLoadingJobs = true; createComponent({}, { ...withLatestPipelineState, isLoadingJobs }); - const jobProps = wrapper - .findAll(GlTab) - .at(1) - .find(JobsList) - .props(); + const jobProps = wrapper.findAll(GlTab).at(1).find(JobsList).props(); expect(jobProps.stages).toBe(failedStages); expect(jobProps.loading).toBe(isLoadingJobs); }); |