Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3e28f1f8
Commit
3e28f1f8
authored
Jan 21, 2021
by
Michael Aigner
Committed by
Jose Ivan Vargas
Jan 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken testsuite link if the suite contains a dot
parent
67b05485
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
app/assets/javascripts/pipelines/stores/test_reports/actions.js
...sets/javascripts/pipelines/stores/test_reports/actions.js
+2
-6
app/views/projects/pipelines/_with_tabs.html.haml
app/views/projects/pipelines/_with_tabs.html.haml
+1
-1
changelogs/unreleased/254643-fix-broken-testsuite-link-when-containing-dot.yml
.../254643-fix-broken-testsuite-link-when-containing-dot.yml
+5
-0
spec/frontend/pipelines/test_reports/stores/actions_spec.js
spec/frontend/pipelines/test_reports/stores/actions_spec.js
+2
-3
No files found.
app/assets/javascripts/pipelines/stores/test_reports/actions.js
View file @
3e28f1f8
...
...
@@ -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
(
e
ndpoint
,
{
params
:
{
build_ids
}
})
.
get
(
state
.
suiteE
ndpoint
,
{
params
:
{
build_ids
}
})
.
then
(({
data
})
=>
commit
(
types
.
SET_SUITE
,
{
suite
:
data
,
index
}))
.
catch
(()
=>
{
createFlash
(
s__
(
'
TestReports|There was an error fetching the test suite.
'
));
...
...
app/views/projects/pipelines/_with_tabs.html.haml
View file @
3e28f1f8
...
...
@@ -85,5 +85,5 @@
#js-tab-tests
.tab-pane
#js-pipeline-tests-detail
{
data:
{
summary_endpoint:
summary_project_pipeline_tests_path
(
@project
,
@pipeline
,
format: :json
),
suite_endpoint:
project_pipeline_test_path
(
@project
,
@pipeline
,
suite_name:
'
:suite_nam
e'
,
format: :json
)
}
}
suite_endpoint:
project_pipeline_test_path
(
@project
,
@pipeline
,
suite_name:
'
suit
e'
,
format: :json
)
}
}
=
render_if_exists
"projects/pipelines/tabs_content"
,
pipeline:
@pipeline
,
project:
@project
changelogs/unreleased/254643-fix-broken-testsuite-link-when-containing-dot.yml
0 → 100644
View file @
3e28f1f8
---
title
:
Fix broken testsuite link if the suite contains a dot
merge_request
:
51828
author
:
Michael Aigner @tonka3000
type
:
fixed
spec/frontend/pipelines/test_reports/stores/actions_spec.js
View file @
3e28f1f8
...
...
@@ -16,7 +16,7 @@ describe('Actions TestReports Store', () => {
const
testReports
=
getJSONFixture
(
'
pipelines/test_report.json
'
);
const
summary
=
{
total_count
:
1
};
const
suiteEndpoint
=
`
${
TEST_HOST
}
/tests/
:suite_nam
e.json`
;
const
suiteEndpoint
=
`
${
TEST_HOST
}
/tests/
suit
e.json`
;
const
summaryEndpoint
=
`
${
TEST_HOST
}
/test_reports/summary.json`
;
const
defaultState
=
{
suiteEndpoint
,
...
...
@@ -69,9 +69,8 @@ describe('Actions TestReports Store', () => {
beforeEach
(()
=>
{
const
buildIds
=
[
1
];
testReports
.
test_suites
[
0
].
build_ids
=
buildIds
;
const
endpoint
=
suiteEndpoint
.
replace
(
'
:suite_name
'
,
testReports
.
test_suites
[
0
].
name
);
mock
.
onGet
(
e
ndpoint
,
{
params
:
{
build_ids
:
buildIds
}
})
.
onGet
(
suiteE
ndpoint
,
{
params
:
{
build_ids
:
buildIds
}
})
.
replyOnce
(
200
,
testReports
.
test_suites
[
0
],
{});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment