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
82b6d9fd
Commit
82b6d9fd
authored
May 25, 2021
by
Jannik Lehmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enhance redesigned app specs
parent
042f10f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
app/assets/javascripts/security_configuration/components/redesigned_app.vue
...ipts/security_configuration/components/redesigned_app.vue
+5
-1
spec/frontend/security_configuration/components/redesigned_app_spec.js
.../security_configuration/components/redesigned_app_spec.js
+23
-0
No files found.
app/assets/javascripts/security_configuration/components/redesigned_app.vue
View file @
82b6d9fd
...
...
@@ -47,7 +47,11 @@ export default {
<div
class=
"row"
>
<div
class=
"col-lg-5"
>
<h2
class=
"gl-font-size-h2 gl-mt-0"
>
{{
$options
.
i18n
.
securityTesting
}}
</h2>
<p
v-if=
"latestPipelinePath"
class=
"gl-line-height-20"
>
<p
v-if=
"latestPipelinePath"
data-testid=
"latest-pipeline-info"
class=
"gl-line-height-20"
>
<gl-sprintf
:message=
"$options.i18n.securityTestingDescription"
>
<template
#link
="
{ content }">
<gl-link
:href=
"latestPipelinePath"
>
{{
content
}}
</gl-link>
...
...
spec/frontend/security_configuration/components/redesigned_app_spec.js
View file @
82b6d9fd
...
...
@@ -74,5 +74,28 @@ describe('NewApp component', () => {
expect
(
cards
.
length
).
toEqual
(
1
);
expect
(
cards
.
at
(
0
).
props
()).
toEqual
({
feature
:
securityFeaturesMock
[
0
]
});
});
it
(
'
should not show latest pipeline link when latestPipelinePath is not defined
'
,
()
=>
{
expect
(
findByTestId
(
'
latest-pipeline-info
'
).
exists
()).
toBe
(
false
);
});
});
describe
(
'
when given latestPipelinePath props
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
({
augmentedSecurityFeatures
:
securityFeaturesMock
,
latestPipelinePath
:
'
test/path
'
,
});
});
it
(
'
should show latest pipeline info with correct link when latestPipelinePath is defined
'
,
()
=>
{
expect
(
findByTestId
(
'
latest-pipeline-info
'
).
exists
()).
toBe
(
true
);
expect
(
findByTestId
(
'
latest-pipeline-info
'
).
text
()).
toMatchInterpolatedText
(
"
The status of the tools only applies to the default branch and is based on the latest pipeline. Once you've enabled a scan for the default branch, any subsequent feature branch you create will include the scan.
"
,
);
expect
(
findByTestId
(
'
latest-pipeline-info
'
).
find
(
'
a
'
).
element
.
href
).
toEqual
(
'
http://test.host/test/path
'
,
);
});
});
});
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