diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/assets/javascripts/pipelines/stores/test_reports/getters.js | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/pipelines/stores/test_reports/getters.js')
-rw-r--r-- | app/assets/javascripts/pipelines/stores/test_reports/getters.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/pipelines/stores/test_reports/getters.js b/app/assets/javascripts/pipelines/stores/test_reports/getters.js index c31e7dd114f..03680de0fa9 100644 --- a/app/assets/javascripts/pipelines/stores/test_reports/getters.js +++ b/app/assets/javascripts/pipelines/stores/test_reports/getters.js @@ -1,4 +1,4 @@ -import { addIconStatus, formattedTime } from './utils'; +import { addIconStatus, formatFilePath, formattedTime } from './utils'; export const getTestSuites = (state) => { const { test_suites: testSuites = [] } = state.testReports; @@ -17,7 +17,15 @@ export const getSuiteTests = (state) => { const { page, perPage } = state.pageInfo; const start = (page - 1) * perPage; - return testCases.map(addIconStatus).slice(start, start + perPage); + return testCases + .map((testCase) => ({ + ...testCase, + classname: testCase.classname || '', + name: testCase.name || '', + filePath: testCase.file ? `${state.blobPath}/${formatFilePath(testCase.file)}` : null, + })) + .map(addIconStatus) + .slice(start, start + perPage); }; export const getSuiteTestCount = (state) => getSelectedSuite(state)?.test_cases?.length || 0; |