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
d0670607
Commit
d0670607
authored
Feb 15, 2021
by
Jannik Lehmann
Committed by
Mark Florian
Feb 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix inline Link on Security Configuration CE Page
parent
66fb025c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
25 deletions
+20
-25
app/assets/javascripts/security_configuration/components/configuration_table.vue
...security_configuration/components/configuration_table.vue
+2
-1
spec/frontend/security_configuration/configuration_table_spec.js
...ontend/security_configuration/configuration_table_spec.js
+18
-24
No files found.
app/assets/javascripts/security_configuration/components/configuration_table.vue
View file @
d0670607
...
@@ -83,7 +83,8 @@ export default {
...
@@ -83,7 +83,8 @@ export default {
{{
item
.
description
}}
{{
item
.
description
}}
<gl-link
<gl-link
target=
"_blank"
target=
"_blank"
:href=
"item.link"
data-testid=
"help-link"
:href=
"item.helpPath"
:aria-label=
"getFeatureDocumentationLinkLabel(item)"
:aria-label=
"getFeatureDocumentationLinkLabel(item)"
>
>
{{
s__
(
'
SecurityConfiguration|More information
'
)
}}
{{
s__
(
'
SecurityConfiguration|More information
'
)
}}
...
...
spec/frontend/security_configuration/configuration_table_spec.js
View file @
d0670607
...
@@ -5,12 +5,7 @@ import { features, UPGRADE_CTA } from '~/security_configuration/components/featu
...
@@ -5,12 +5,7 @@ import { features, UPGRADE_CTA } from '~/security_configuration/components/featu
import
{
import
{
REPORT_TYPE_SAST
,
REPORT_TYPE_SAST
,
REPORT_TYPE_DAST
,
REPORT_TYPE_SECRET_DETECTION
,
REPORT_TYPE_DAST_PROFILES
,
REPORT_TYPE_DEPENDENCY_SCANNING
,
REPORT_TYPE_CONTAINER_SCANNING
,
REPORT_TYPE_COVERAGE_FUZZING
,
REPORT_TYPE_LICENSE_COMPLIANCE
,
}
from
'
~/vue_shared/security_reports/constants
'
;
}
from
'
~/vue_shared/security_reports/constants
'
;
describe
(
'
Configuration Table Component
'
,
()
=>
{
describe
(
'
Configuration Table Component
'
,
()
=>
{
...
@@ -20,6 +15,8 @@ describe('Configuration Table Component', () => {
...
@@ -20,6 +15,8 @@ describe('Configuration Table Component', () => {
wrapper
=
extendedWrapper
(
mount
(
ConfigurationTable
,
{}));
wrapper
=
extendedWrapper
(
mount
(
ConfigurationTable
,
{}));
};
};
const
findHelpLinks
=
()
=>
wrapper
.
findAll
(
'
[data-testid="help-link"]
'
);
afterEach
(()
=>
{
afterEach
(()
=>
{
wrapper
.
destroy
();
wrapper
.
destroy
();
});
});
...
@@ -28,23 +25,20 @@ describe('Configuration Table Component', () => {
...
@@ -28,23 +25,20 @@ describe('Configuration Table Component', () => {
createComponent
();
createComponent
();
});
});
it
.
each
(
features
)(
'
should match strings
'
,
(
feature
)
=>
{
describe
.
each
(
features
.
map
((
feature
,
i
)
=>
[
feature
,
i
]))(
'
given feature %s
'
,
(
feature
,
i
)
=>
{
expect
(
wrapper
.
text
()).
toContain
(
feature
.
name
);
it
(
'
should match strings
'
,
()
=>
{
expect
(
wrapper
.
text
()).
toContain
(
feature
.
description
);
expect
(
wrapper
.
text
()).
toContain
(
feature
.
name
);
expect
(
wrapper
.
text
()).
toContain
(
feature
.
description
);
if
(
feature
.
type
===
REPORT_TYPE_SAST
)
{
if
(
feature
.
type
===
REPORT_TYPE_SAST
)
{
expect
(
wrapper
.
findByTestId
(
feature
.
type
).
text
()).
toBe
(
'
Configure via Merge Request
'
);
expect
(
wrapper
.
findByTestId
(
feature
.
type
).
text
()).
toBe
(
'
Configure via Merge Request
'
);
}
else
if
(
}
else
if
(
feature
.
type
!==
REPORT_TYPE_SECRET_DETECTION
)
{
[
expect
(
wrapper
.
findByTestId
(
feature
.
type
).
text
()).
toMatchInterpolatedText
(
UPGRADE_CTA
);
REPORT_TYPE_DAST
,
}
REPORT_TYPE_DAST_PROFILES
,
});
REPORT_TYPE_DEPENDENCY_SCANNING
,
REPORT_TYPE_CONTAINER_SCANNING
,
it
(
'
should show expected help link
'
,
()
=>
{
REPORT_TYPE_COVERAGE_FUZZING
,
const
helpLink
=
findHelpLinks
().
at
(
i
);
REPORT_TYPE_LICENSE_COMPLIANCE
,
expect
(
helpLink
.
attributes
(
'
href
'
)).
toBe
(
feature
.
helpPath
);
].
includes
(
feature
.
type
)
});
)
{
expect
(
wrapper
.
findByTestId
(
feature
.
type
).
text
()).
toMatchInterpolatedText
(
UPGRADE_CTA
);
}
});
});
});
});
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