diff options
Diffstat (limited to 'spec/frontend/reports')
4 files changed, 13 insertions, 31 deletions
diff --git a/spec/frontend/reports/accessibility_report/mock_data.js b/spec/frontend/reports/accessibility_report/mock_data.js index f8e832c1ce5..20ad01bd802 100644 --- a/spec/frontend/reports/accessibility_report/mock_data.js +++ b/spec/frontend/reports/accessibility_report/mock_data.js @@ -1,3 +1,4 @@ +// eslint-disable-next-line import/prefer-default-export export const mockReport = { status: 'failed', summary: { @@ -51,5 +52,3 @@ export const mockReport = { existing_notes: [], existing_warnings: [], }; - -export default () => {}; diff --git a/spec/frontend/reports/accessibility_report/store/actions_spec.js b/spec/frontend/reports/accessibility_report/store/actions_spec.js index 129a5bade86..9f210659cfd 100644 --- a/spec/frontend/reports/accessibility_report/store/actions_spec.js +++ b/spec/frontend/reports/accessibility_report/store/actions_spec.js @@ -1,10 +1,10 @@ -import axios from '~/lib/utils/axios_utils'; import MockAdapter from 'axios-mock-adapter'; +import { TEST_HOST } from 'spec/test_constants'; +import testAction from 'helpers/vuex_action_helper'; +import axios from '~/lib/utils/axios_utils'; import * as actions from '~/reports/accessibility_report/store/actions'; import * as types from '~/reports/accessibility_report/store/mutation_types'; import createStore from '~/reports/accessibility_report/store'; -import { TEST_HOST } from 'spec/test_constants'; -import testAction from 'helpers/vuex_action_helper'; import { mockReport } from '../mock_data'; describe('Accessibility Reports actions', () => { diff --git a/spec/frontend/reports/codequality_report/store/actions_spec.js b/spec/frontend/reports/codequality_report/store/actions_spec.js index 6c30fdb7871..7d9e4bbbe9f 100644 --- a/spec/frontend/reports/codequality_report/store/actions_spec.js +++ b/spec/frontend/reports/codequality_report/store/actions_spec.js @@ -1,10 +1,10 @@ -import axios from '~/lib/utils/axios_utils'; import MockAdapter from 'axios-mock-adapter'; +import { TEST_HOST } from 'spec/test_constants'; +import testAction from 'helpers/vuex_action_helper'; +import axios from '~/lib/utils/axios_utils'; import * as actions from '~/reports/codequality_report/store/actions'; import * as types from '~/reports/codequality_report/store/mutation_types'; import createStore from '~/reports/codequality_report/store'; -import { TEST_HOST } from 'spec/test_constants'; -import testAction from 'helpers/vuex_action_helper'; import { headIssues, baseIssues, mockParsedHeadIssues, mockParsedBaseIssues } from '../mock_data'; // mock codequality comparison worker diff --git a/spec/frontend/reports/components/grouped_test_reports_app_spec.js b/spec/frontend/reports/components/grouped_test_reports_app_spec.js index 017e0335569..c26e2fbc19a 100644 --- a/spec/frontend/reports/components/grouped_test_reports_app_spec.js +++ b/spec/frontend/reports/components/grouped_test_reports_app_spec.js @@ -20,10 +20,7 @@ describe('Grouped test reports app', () => { let wrapper; let mockStore; - const mountComponent = ({ - glFeatures = { junitPipelineView: false }, - props = { pipelinePath }, - } = {}) => { + const mountComponent = ({ props = { pipelinePath } } = {}) => { wrapper = mount(Component, { store: mockStore, localVue, @@ -35,9 +32,6 @@ describe('Grouped test reports app', () => { methods: { fetchReports: () => {}, }, - provide: { - glFeatures, - }, }); }; @@ -78,28 +72,17 @@ describe('Grouped test reports app', () => { }); describe('`View full report` button', () => { - it('should not render the full test report link', () => { - expect(findFullTestReportLink().exists()).toBe(false); - }); + it('should render the full test report link', () => { + const fullTestReportLink = findFullTestReportLink(); - describe('With junitPipelineView feature flag enabled', () => { - beforeEach(() => { - mountComponent({ glFeatures: { junitPipelineView: true } }); - }); - - it('should render the full test report link', () => { - const fullTestReportLink = findFullTestReportLink(); - - expect(fullTestReportLink.exists()).toBe(true); - expect(pipelinePath).not.toBe(''); - expect(fullTestReportLink.attributes('href')).toBe(`${pipelinePath}/test_report`); - }); + expect(fullTestReportLink.exists()).toBe(true); + expect(pipelinePath).not.toBe(''); + expect(fullTestReportLink.attributes('href')).toBe(`${pipelinePath}/test_report`); }); describe('Without a pipelinePath', () => { beforeEach(() => { mountComponent({ - glFeatures: { junitPipelineView: true }, props: { pipelinePath: '' }, }); }); |