diff options
Diffstat (limited to 'app/assets/javascripts/pipelines/stores/test_reports/actions.js')
-rw-r--r-- | app/assets/javascripts/pipelines/stores/test_reports/actions.js | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/app/assets/javascripts/pipelines/stores/test_reports/actions.js b/app/assets/javascripts/pipelines/stores/test_reports/actions.js index 34f5130a3e7..686ddd664d6 100644 --- a/app/assets/javascripts/pipelines/stores/test_reports/actions.js +++ b/app/assets/javascripts/pipelines/stores/test_reports/actions.js @@ -4,39 +4,25 @@ import createFlash from '~/flash'; import { s__ } from '~/locale'; export const fetchSummary = ({ state, commit, dispatch }) => { - // If we do this without the build_report_summary feature flag enabled - // it causes a race condition for toggleLoading and ruins the loading - // state in the application - if (state.useBuildSummaryReport) { - dispatch('toggleLoading'); - } + dispatch('toggleLoading'); return axios .get(state.summaryEndpoint) .then(({ data }) => { commit(types.SET_SUMMARY, data); - - if (!state.useBuildSummaryReport) { - // Set the tab counter badge to total_count - // This is temporary until we can server-side render that count number - // (see https://gitlab.com/gitlab-org/gitlab/-/issues/223134) - document.querySelector('.js-test-report-badge-counter').innerHTML = data.total_count || 0; - } }) .catch(() => { createFlash(s__('TestReports|There was an error fetching the summary.')); }) .finally(() => { - if (state.useBuildSummaryReport) { - dispatch('toggleLoading'); - } + dispatch('toggleLoading'); }); }; export const fetchTestSuite = ({ state, commit, dispatch }, index) => { const { hasFullSuite } = state.testReports?.test_suites?.[index] || {}; // We don't need to fetch the suite if we have the information already - if (state.hasFullReport || hasFullSuite) { + if (hasFullSuite) { return Promise.resolve(); } @@ -61,20 +47,6 @@ export const fetchTestSuite = ({ state, commit, dispatch }, index) => { }); }; -export const fetchFullReport = ({ state, commit, dispatch }) => { - dispatch('toggleLoading'); - - return axios - .get(state.fullReportEndpoint) - .then(({ data }) => commit(types.SET_REPORTS, data)) - .catch(() => { - createFlash(s__('TestReports|There was an error fetching the test reports.')); - }) - .finally(() => { - dispatch('toggleLoading'); - }); -}; - export const setSelectedSuiteIndex = ({ commit }, data) => commit(types.SET_SELECTED_SUITE_INDEX, data); export const removeSelectedSuiteIndex = ({ commit }) => |