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
972d6ff4
Commit
972d6ff4
authored
Feb 20, 2018
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature specs for a pipeline security page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
125f2bb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
ee/spec/features/projects/pipelines/pipeline_spec.rb
ee/spec/features/projects/pipelines/pipeline_spec.rb
+58
-0
No files found.
ee/spec/features/projects/pipelines/pipeline_spec.rb
0 → 100644
View file @
972d6ff4
require
'spec_helper'
describe
'Pipeline'
,
:js
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
sign_in
(
user
)
project
.
add_developer
(
user
)
end
describe
'GET /:project/pipelines/:id/security'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
ref:
'master'
,
sha:
project
.
commit
.
id
)
}
let
(
:build
)
do
create
(
:ci_build
,
:artifacts
,
name:
'sast'
,
pipeline:
pipeline
,
options:
{
artifacts:
{
paths:
[
Ci
::
Build
::
SAST_FILE
]
}
}
)
end
context
'when there is a sast artifact'
do
before
do
build
visit
security_project_pipeline_path
(
project
,
pipeline
)
end
it
'shows jobs tab pane as active'
do
expect
(
page
).
to
have_content
(
'Security report'
)
expect
(
page
).
to
have_css
(
'#js-tab-security'
)
end
it
'shows security report'
do
expect
(
page
).
to
have_content
(
'SAST detected no security vulnerabilities'
)
end
end
context
'without sast artifact'
do
before
do
visit
security_project_pipeline_path
(
project
,
pipeline
)
end
it
'displays the pipeline graph'
do
expect
(
current_path
).
to
eq
(
pipeline_path
(
pipeline
))
expect
(
page
).
not_to
have_content
(
'Security report'
)
end
end
end
end
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