diff options
Diffstat (limited to 'spec/frontend/ide/components/jobs')
6 files changed, 11 insertions, 14 deletions
diff --git a/spec/frontend/ide/components/jobs/detail/description_spec.js b/spec/frontend/ide/components/jobs/detail/description_spec.js index 5554738336a..786a7661d97 100644 --- a/spec/frontend/ide/components/jobs/detail/description_spec.js +++ b/spec/frontend/ide/components/jobs/detail/description_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; +import mountComponent from 'helpers/vue_mount_component_helper'; import Description from '~/ide/components/jobs/detail/description.vue'; -import mountComponent from '../../../../helpers/vue_mount_component_helper'; import { jobs } from '../../../mock_data'; describe('IDE job description', () => { diff --git a/spec/frontend/ide/components/jobs/detail/scroll_button_spec.js b/spec/frontend/ide/components/jobs/detail/scroll_button_spec.js index 57174181a3d..b323ad8320c 100644 --- a/spec/frontend/ide/components/jobs/detail/scroll_button_spec.js +++ b/spec/frontend/ide/components/jobs/detail/scroll_button_spec.js @@ -5,7 +5,7 @@ import ScrollButton from '~/ide/components/jobs/detail/scroll_button.vue'; describe('IDE job log scroll button', () => { let wrapper; - const createComponent = props => { + const createComponent = (props) => { wrapper = shallowMount(ScrollButton, { propsData: { direction: 'up', diff --git a/spec/frontend/ide/components/jobs/detail_spec.js b/spec/frontend/ide/components/jobs/detail_spec.js index 496d8284fdd..79ac0a8122a 100644 --- a/spec/frontend/ide/components/jobs/detail_spec.js +++ b/spec/frontend/ide/components/jobs/detail_spec.js @@ -1,8 +1,8 @@ import Vue from 'vue'; import { TEST_HOST } from 'helpers/test_constants'; +import { createComponentWithStore } from 'helpers/vue_mount_component_helper'; import JobDetail from '~/ide/components/jobs/detail.vue'; import { createStore } from '~/ide/stores'; -import { createComponentWithStore } from '../../../helpers/vue_mount_component_helper'; import { jobs } from '../../mock_data'; describe('IDE jobs detail view', () => { @@ -48,7 +48,7 @@ describe('IDE jobs detail view', () => { expect(vm.$el.querySelector('.bash').textContent).toContain('testing'); }); - it('renders empty message output', done => { + it('renders empty message output', (done) => { vm.$store.state.pipelines.detailJob.output = ''; vm.$nextTick(() => { @@ -68,7 +68,7 @@ describe('IDE jobs detail view', () => { expect(vm.$el.querySelector('.bash').style.display).toBe('none'); }); - it('hide loading icon when isLoading is false', done => { + it('hide loading icon when isLoading is false', (done) => { vm.$store.state.pipelines.detailJob.isLoading = false; vm.$nextTick(() => { diff --git a/spec/frontend/ide/components/jobs/item_spec.js b/spec/frontend/ide/components/jobs/item_spec.js index 93c01640b54..7343fc80a03 100644 --- a/spec/frontend/ide/components/jobs/item_spec.js +++ b/spec/frontend/ide/components/jobs/item_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; +import mountComponent from 'helpers/vue_mount_component_helper'; import JobItem from '~/ide/components/jobs/item.vue'; -import mountComponent from '../../../helpers/vue_mount_component_helper'; import { jobs } from '../../mock_data'; describe('IDE jobs item', () => { @@ -27,7 +27,7 @@ describe('IDE jobs item', () => { expect(vm.$el.querySelector('[data-testid="status_success_borderless-icon"]')).not.toBe(null); }); - it('does not render view logs button if not started', done => { + it('does not render view logs button if not started', (done) => { vm.job.started = false; vm.$nextTick(() => { diff --git a/spec/frontend/ide/components/jobs/list_spec.js b/spec/frontend/ide/components/jobs/list_spec.js index e821a585e18..5c5c6602374 100644 --- a/spec/frontend/ide/components/jobs/list_spec.js +++ b/spec/frontend/ide/components/jobs/list_spec.js @@ -36,7 +36,7 @@ describe('IDE stages list', () => { status: { icon: 'status_success' }, })); - const createComponent = props => { + const createComponent = (props) => { wrapper = shallowMount(StageList, { propsData: { ...defaultProps, @@ -48,7 +48,7 @@ describe('IDE stages list', () => { }; afterEach(() => { - Object.values(storeActions).forEach(actionMock => actionMock.mockClear()); + Object.values(storeActions).forEach((actionMock) => actionMock.mockClear()); }); afterAll(() => { diff --git a/spec/frontend/ide/components/jobs/stage_spec.js b/spec/frontend/ide/components/jobs/stage_spec.js index 3a47571ee13..e80215b9d13 100644 --- a/spec/frontend/ide/components/jobs/stage_spec.js +++ b/spec/frontend/ide/components/jobs/stage_spec.js @@ -20,7 +20,7 @@ describe('IDE pipeline stage', () => { const findHeader = () => wrapper.find({ ref: 'cardHeader' }); const findJobList = () => wrapper.find({ ref: 'jobList' }); - const createComponent = props => { + const createComponent = (props) => { wrapper = shallowMount(Stage, { propsData: { ...defaultProps, @@ -60,10 +60,7 @@ describe('IDE pipeline stage', () => { it('emits clickViewLog entity with job', () => { const [job] = defaultProps.stage.jobs; createComponent(); - wrapper - .findAll(Item) - .at(0) - .vm.$emit('clickViewLog', job); + wrapper.findAll(Item).at(0).vm.$emit('clickViewLog', job); return wrapper.vm.$nextTick().then(() => { expect(wrapper.emitted().clickViewLog[0][0]).toBe(job); }); |