Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pipelines/stores/test_reports/actions.js')
-rw-r--r--app/assets/javascripts/pipelines/stores/test_reports/actions.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/app/assets/javascripts/pipelines/stores/test_reports/actions.js b/app/assets/javascripts/pipelines/stores/test_reports/actions.js
index 3c664457756..6de345233ae 100644
--- a/app/assets/javascripts/pipelines/stores/test_reports/actions.js
+++ b/app/assets/javascripts/pipelines/stores/test_reports/actions.js
@@ -1,7 +1,7 @@
-import axios from '~/lib/utils/axios_utils';
-import * as types from './mutation_types';
import { deprecatedCreateFlash as createFlash } from '~/flash';
+import axios from '~/lib/utils/axios_utils';
import { s__ } from '~/locale';
+import * as types from './mutation_types';
export const fetchSummary = ({ state, commit, dispatch }) => {
dispatch('toggleLoading');
@@ -28,16 +28,12 @@ export const fetchTestSuite = ({ state, commit, dispatch }, index) => {
dispatch('toggleLoading');
- const { name = '', build_ids = [] } = state.testReports?.test_suites?.[index] || {};
+ const { build_ids = [] } = state.testReports?.test_suites?.[index] || {};
// Replacing `/:suite_name.json` with the name of the suite. Including the extra characters
// to ensure that we replace exactly the template part of the URL string
- const endpoint = state.suiteEndpoint?.replace(
- '/:suite_name.json',
- `/${encodeURIComponent(name)}.json`,
- );
return axios
- .get(endpoint, { params: { build_ids } })
+ .get(state.suiteEndpoint, { params: { build_ids } })
.then(({ data }) => commit(types.SET_SUITE, { suite: data, index }))
.catch(() => {
createFlash(s__('TestReports|There was an error fetching the test suite.'));