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
53faa4aa
Commit
53faa4aa
authored
Apr 07, 2021
by
Paul Gascou-Vaillancourt
Committed by
Dheeraj Joshi
Apr 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Render markup in DAST profiles library errors
parent
268cccb0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
ee/app/assets/javascripts/security_configuration/dast_profiles/components/dast_profiles_list.vue
...iguration/dast_profiles/components/dast_profiles_list.vue
+7
-1
ee/spec/frontend/security_configuration/dast_profiles/components/dast_profiles_list_spec.js
...ation/dast_profiles/components/dast_profiles_list_spec.js
+11
-0
No files found.
ee/app/assets/javascripts/security_configuration/dast_profiles/components/dast_profiles_list.vue
View file @
53faa4aa
...
...
@@ -5,6 +5,7 @@ import {
GlModal
,
GlSkeletonLoader
,
GlTable
,
GlSafeHtmlDirective
,
GlTooltipDirective
,
GlDropdown
,
GlDropdownItem
,
...
...
@@ -26,6 +27,7 @@ export default {
GlIcon
,
},
directives
:
{
SafeHtml
:
GlSafeHtmlDirective
,
GlTooltip
:
GlTooltipDirective
,
},
props
:
{
...
...
@@ -164,7 +166,11 @@ export default {
:aria-label=
"__('DastProfiles|Error Details')"
class=
"gl-p-0 gl-m-0"
>
<li
v-for=
"errorDetail in errorDetails"
:key=
"errorDetail"
>
{{
errorDetail
}}
</li>
<li
v-for=
"errorDetail in errorDetails"
:key=
"errorDetail"
v-safe-html=
"errorDetail"
></li>
</ul>
</gl-alert>
</td>
...
...
ee/spec/frontend/security_configuration/dast_profiles/components/dast_profiles_list_spec.js
View file @
53faa4aa
...
...
@@ -244,6 +244,17 @@ describe('EE - DastProfilesList', () => {
expect
(
within
(
getErrorDetails
()).
getByText
(
errorDetails
[
0
])).
not
.
toBe
(
null
);
expect
(
within
(
getErrorDetails
()).
getByText
(
errorDetails
[
1
])).
not
.
toBe
(
null
);
});
it
(
'
properly renders errors containing markup
'
,
()
=>
{
const
errorDetails
=
[
'
an error <a href="#">with a link</a>
'
];
createFullComponent
({
propsData
:
{
errorMessage
:
TEST_ERROR_MESSAGE
,
errorDetails
},
});
expect
(
getErrorMessage
()).
not
.
toBe
(
null
);
expect
(
getErrorDetails
()).
not
.
toBe
(
null
);
expect
(
within
(
getErrorDetails
()).
getByRole
(
'
link
'
,
{
name
:
'
with a link
'
})).
not
.
toBe
(
null
);
});
});
describe
(
'
profile referenced in a security policy
'
,
()
=>
{
...
...
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