Commit 858a3387 authored by Shubham Kumar's avatar Shubham Kumar Committed by Scott Hampton

Move `grouped_test_reports_app` components

Refactor `grouped_test_reports_app` and related files
to be in their own directory instead of the shared reports
directory.
parent be7b38c4
import AccessibilityIssueBody from '../accessibility_report/components/accessibility_issue_body.vue'; import AccessibilityIssueBody from '../accessibility_report/components/accessibility_issue_body.vue';
import CodequalityIssueBody from '../codequality_report/components/codequality_issue_body.vue'; import CodequalityIssueBody from '../codequality_report/components/codequality_issue_body.vue';
import TestIssueBody from './test_issue_body.vue'; import TestIssueBody from '../grouped_test_report/components/test_issue_body.vue';
export const components = { export const components = {
AccessibilityIssueBody, AccessibilityIssueBody,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { GlModal, GlLink, GlSprintf } from '@gitlab/ui'; import { GlModal, GlLink, GlSprintf } from '@gitlab/ui';
import CodeBlock from '~/vue_shared/components/code_block.vue'; import CodeBlock from '~/vue_shared/components/code_block.vue';
import { fieldTypes } from '../constants'; import { fieldTypes } from '../../constants';
export default { export default {
components: { components: {
......
...@@ -3,7 +3,7 @@ import { GlBadge, GlButton } from '@gitlab/ui'; ...@@ -3,7 +3,7 @@ import { GlBadge, GlButton } from '@gitlab/ui';
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import { sprintf, n__ } from '~/locale'; import { sprintf, n__ } from '~/locale';
import IssueStatusIcon from '~/reports/components/issue_status_icon.vue'; import IssueStatusIcon from '~/reports/components/issue_status_icon.vue';
import { STATUS_NEUTRAL } from '../constants'; import { STATUS_NEUTRAL } from '../../constants';
export default { export default {
name: 'TestIssueBody', name: 'TestIssueBody',
......
...@@ -4,18 +4,18 @@ import { once } from 'lodash'; ...@@ -4,18 +4,18 @@ import { once } from 'lodash';
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { sprintf, s__ } from '~/locale'; import { sprintf, s__ } from '~/locale';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
import createStore from '../store'; import GroupedIssuesList from '../components/grouped_issues_list.vue';
import { componentNames } from '../components/issue_body';
import ReportSection from '../components/report_section.vue';
import SummaryRow from '../components/summary_row.vue';
import Modal from './components/modal.vue';
import createStore from './store';
import { import {
summaryTextBuilder, summaryTextBuilder,
reportTextBuilder, reportTextBuilder,
statusIcon, statusIcon,
recentFailuresTextBuilder, recentFailuresTextBuilder,
} from '../store/utils'; } from './store/utils';
import GroupedIssuesList from './grouped_issues_list.vue';
import { componentNames } from './issue_body';
import Modal from './modal.vue';
import ReportSection from './report_section.vue';
import SummaryRow from './summary_row.vue';
export default { export default {
name: 'GroupedTestReportsApp', name: 'GroupedTestReportsApp',
......
import Visibility from 'visibilityjs'; import Visibility from 'visibilityjs';
import axios from '../../lib/utils/axios_utils'; import axios from '../../../lib/utils/axios_utils';
import httpStatusCodes from '../../lib/utils/http_status'; import httpStatusCodes from '../../../lib/utils/http_status';
import Poll from '../../lib/utils/poll'; import Poll from '../../../lib/utils/poll';
import * as types from './mutation_types'; import * as types from './mutation_types';
export const setEndpoint = ({ commit }, endpoint) => commit(types.SET_ENDPOINT, endpoint); export const setEndpoint = ({ commit }, endpoint) => commit(types.SET_ENDPOINT, endpoint);
......
import { LOADING, ERROR, SUCCESS, STATUS_FAILED } from '../constants'; import { LOADING, ERROR, SUCCESS, STATUS_FAILED } from '../../constants';
export const summaryStatus = (state) => { export const summaryStatus = (state) => {
if (state.isLoading) { if (state.isLoading) {
......
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { fieldTypes } from '../constants'; import { fieldTypes } from '../../constants';
export default () => ({ export default () => ({
endpoint: null, endpoint: null,
......
...@@ -5,7 +5,7 @@ import { ...@@ -5,7 +5,7 @@ import {
ICON_WARNING, ICON_WARNING,
ICON_SUCCESS, ICON_SUCCESS,
ICON_NOTFOUND, ICON_NOTFOUND,
} from '../constants'; } from '../../constants';
const textBuilder = (results) => { const textBuilder = (results) => {
const { failed, errored, resolved, total } = results; const { failed, errored, resolved, total } = results;
......
...@@ -14,7 +14,7 @@ import { deprecatedCreateFlash as createFlash } from '../flash'; ...@@ -14,7 +14,7 @@ import { deprecatedCreateFlash as createFlash } from '../flash';
import { setFaviconOverlay } from '../lib/utils/favicon'; import { setFaviconOverlay } from '../lib/utils/favicon';
import GroupedAccessibilityReportsApp from '../reports/accessibility_report/grouped_accessibility_reports_app.vue'; import GroupedAccessibilityReportsApp from '../reports/accessibility_report/grouped_accessibility_reports_app.vue';
import GroupedCodequalityReportsApp from '../reports/codequality_report/grouped_codequality_reports_app.vue'; import GroupedCodequalityReportsApp from '../reports/codequality_report/grouped_codequality_reports_app.vue';
import GroupedTestReportsApp from '../reports/components/grouped_test_reports_app.vue'; import GroupedTestReportsApp from '../reports/grouped_test_report/grouped_test_reports_app.vue';
import Loading from './components/loading.vue'; import Loading from './components/loading.vue';
import MrWidgetAlertMessage from './components/mr_widget_alert_message.vue'; import MrWidgetAlertMessage from './components/mr_widget_alert_message.vue';
import WidgetHeader from './components/mr_widget_header.vue'; import WidgetHeader from './components/mr_widget_header.vue';
......
...@@ -2,8 +2,8 @@ import { GlLink, GlSprintf } from '@gitlab/ui'; ...@@ -2,8 +2,8 @@ import { GlLink, GlSprintf } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import ReportsModal from '~/reports/components/modal.vue'; import ReportsModal from '~/reports/grouped_test_report/components/modal.vue';
import state from '~/reports/store/state'; import state from '~/reports/grouped_test_report/store/state';
import CodeBlock from '~/vue_shared/components/code_block.vue'; import CodeBlock from '~/vue_shared/components/code_block.vue';
const StubbedGlModal = { template: '<div><slot></slot></div>', name: 'GlModal', props: ['title'] }; const StubbedGlModal = { template: '<div><slot></slot></div>', name: 'GlModal', props: ['title'] };
......
...@@ -3,8 +3,8 @@ import { shallowMount, createLocalVue } from '@vue/test-utils'; ...@@ -3,8 +3,8 @@ import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex'; import Vuex from 'vuex';
import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import IssueStatusIcon from '~/reports/components/issue_status_icon.vue'; import IssueStatusIcon from '~/reports/components/issue_status_icon.vue';
import TestIssueBody from '~/reports/components/test_issue_body.vue'; import TestIssueBody from '~/reports/grouped_test_report/components/test_issue_body.vue';
import { failedIssue, successIssue } from '../mock_data/mock_data'; import { failedIssue, successIssue } from '../../mock_data/mock_data';
const localVue = createLocalVue(); const localVue = createLocalVue();
localVue.use(Vuex); localVue.use(Vuex);
......
import { mount, createLocalVue } from '@vue/test-utils'; import { mount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex'; import Vuex from 'vuex';
import { mockTracking } from 'helpers/tracking_helper'; import { mockTracking } from 'helpers/tracking_helper';
import GroupedTestReportsApp from '~/reports/components/grouped_test_reports_app.vue'; import GroupedTestReportsApp from '~/reports/grouped_test_report/grouped_test_reports_app.vue';
import { getStoreConfig } from '~/reports/store'; import { getStoreConfig } from '~/reports/grouped_test_report/store';
import { failedReport } from '../mock_data/mock_data'; import { failedReport } from '../mock_data/mock_data';
import mixedResultsTestReports from '../mock_data/new_and_fixed_failures_report.json'; import mixedResultsTestReports from '../mock_data/new_and_fixed_failures_report.json';
......
...@@ -12,9 +12,9 @@ import { ...@@ -12,9 +12,9 @@ import {
receiveReportsError, receiveReportsError,
openModal, openModal,
closeModal, closeModal,
} from '~/reports/store/actions'; } from '~/reports/grouped_test_report/store/actions';
import * as types from '~/reports/store/mutation_types'; import * as types from '~/reports/grouped_test_report/store/mutation_types';
import state from '~/reports/store/state'; import state from '~/reports/grouped_test_report/store/state';
describe('Reports Store Actions', () => { describe('Reports Store Actions', () => {
let mockedState; let mockedState;
......
import * as types from '~/reports/store/mutation_types'; import * as types from '~/reports/grouped_test_report/store/mutation_types';
import mutations from '~/reports/store/mutations'; import mutations from '~/reports/grouped_test_report/store/mutations';
import state from '~/reports/store/state'; import state from '~/reports/grouped_test_report/store/state';
import { failedIssue } from '../mock_data/mock_data'; import { failedIssue } from '../../mock_data/mock_data';
describe('Reports Store Mutations', () => { describe('Reports Store Mutations', () => {
let stateCopy; let stateCopy;
......
...@@ -5,7 +5,7 @@ import { ...@@ -5,7 +5,7 @@ import {
ICON_SUCCESS, ICON_SUCCESS,
ICON_NOTFOUND, ICON_NOTFOUND,
} from '~/reports/constants'; } from '~/reports/constants';
import * as utils from '~/reports/store/utils'; import * as utils from '~/reports/grouped_test_report/store/utils';
describe('Reports store utils', () => { describe('Reports store utils', () => {
describe('summaryTextbuilder', () => { describe('summaryTextbuilder', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment