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
e6673393
Commit
e6673393
authored
Sep 20, 2019
by
Aleksandr Soborov
Committed by
Ramya Authappan
Sep 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added E2E test for all Secure reports in MRs
Updated page object and data selectors
parent
5f2b202a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
4 deletions
+40
-4
ee/app/assets/javascripts/vue_shared/security_reports/grouped_security_reports_app.vue
..._shared/security_reports/grouped_security_reports_app.vue
+4
-0
qa/qa/ee/page/merge_request/show.rb
qa/qa/ee/page/merge_request/show.rb
+23
-2
qa/qa/specs/features/ee/browser_ui/secure/create_merge_request_with_secure_spec.rb
...rowser_ui/secure/create_merge_request_with_secure_spec.rb
+13
-2
No files found.
ee/app/assets/javascripts/vue_shared/security_reports/grouped_security_reports_app.vue
View file @
e6673393
...
...
@@ -351,6 +351,7 @@ export default {
:status-icon=
"sastStatusIcon"
:popover-options=
"sastPopover"
class=
"js-sast-widget"
data-qa-selector=
"sast_scan_report"
/>
<issues-list
...
...
@@ -369,6 +370,7 @@ export default {
:status-icon=
"dependencyScanningStatusIcon"
:popover-options=
"dependencyScanningPopover"
class=
"js-dependency-scanning-widget"
data-qa-selector=
"dependency_scan_report"
/>
<issues-list
...
...
@@ -386,6 +388,7 @@ export default {
:status-icon=
"sastContainerStatusIcon"
:popover-options=
"sastContainerPopover"
class=
"js-sast-container"
data-qa-selector=
"container_scan_report"
/>
<issues-list
...
...
@@ -403,6 +406,7 @@ export default {
:status-icon=
"dastStatusIcon"
:popover-options=
"dastPopover"
class=
"js-dast-widget"
data-qa-selector=
"dast_scan_report"
/>
<issues-list
...
...
qa/qa/ee/page/merge_request/show.rb
View file @
e6673393
...
...
@@ -39,6 +39,10 @@ module QA
view
'ee/app/assets/javascripts/vue_shared/security_reports/grouped_security_reports_app.vue'
do
element
:vulnerability_report_grouped
element
:sast_scan_report
element
:dependency_scan_report
element
:container_scan_report
element
:dast_scan_report
end
view
'app/assets/javascripts/reports/components/report_section.vue'
do
...
...
@@ -129,11 +133,28 @@ module QA
finished_loading?
has_element?
(
:vulnerability_report_grouped
,
wait:
1
)
end
find_element
(
:vulnerability_report_grouped
).
has_no_content?
(
"is loading"
)
end
def
has_
detected
_vulnerability_count_of?
(
expected
)
def
has_
total
_vulnerability_count_of?
(
expected
)
# Match text cut off in order to find both "1 vulnerability" and "X vulnerabilities"
find_element
(
:vulnerability_report_grouped
).
has_content?
(
"detected
#{
expected
}
vulnerabilit"
)
find_element
(
:vulnerability_report_grouped
).
has_content?
(
"Security scanning detected
#{
expected
}
vulnerabilit"
)
end
def
has_sast_vulnerability_count_of?
(
expected
)
find_element
(
:sast_scan_report
).
has_content?
(
"SAST detected
#{
expected
}
vulnerabilit"
)
end
def
has_dependency_vulnerability_count_of?
(
expected
)
find_element
(
:dependency_scan_report
).
has_content?
(
"Dependency scanning detected
#{
expected
}
vulnerabilit"
)
end
def
has_container_vulnerability_count_of?
(
expected
)
find_element
(
:container_scan_report
).
has_content?
(
"Container scanning detected
#{
expected
}
vulnerabilit"
)
end
def
has_dast_vulnerability_count_of?
(
expected
)
find_element
(
:dast_scan_report
).
has_content?
(
"DAST detected
#{
expected
}
vulnerabilit"
)
end
def
num_approvals_required
...
...
qa/qa/specs/features/ee/browser_ui/secure/create_merge_request_with_secure_spec.rb
View file @
e6673393
...
...
@@ -6,6 +6,10 @@ module QA
context
'Secure'
,
:docker
do
describe
'Security Reports in a Merge Request'
do
let
(
:total_vuln_count
)
{
49
}
let
(
:sast_vuln_count
)
{
33
}
let
(
:dependency_scan_vuln_count
)
{
4
}
let
(
:container_scan_vuln_count
)
{
8
}
let
(
:dast_vuln_count
)
{
4
}
after
do
Service
::
Runner
.
new
(
@executor
).
remove!
...
...
@@ -56,10 +60,17 @@ module QA
merge_request
.
visit!
end
it
'displays the Security report in the merge request'
do
it
'displays the Security report
s
in the merge request'
do
Page
::
MergeRequest
::
Show
.
perform
do
|
mergerequest
|
expect
(
mergerequest
).
to
have_vulnerability_report
(
timeout:
60
)
expect
(
mergerequest
).
to
have_detected_vulnerability_count_of
total_vuln_count
expect
(
mergerequest
).
to
have_total_vulnerability_count_of
(
total_vuln_count
)
mergerequest
.
expand_vulnerability_report
expect
(
mergerequest
).
to
have_sast_vulnerability_count_of
(
sast_vuln_count
)
expect
(
mergerequest
).
to
have_dependency_vulnerability_count_of
(
dependency_scan_vuln_count
)
expect
(
mergerequest
).
to
have_container_vulnerability_count_of
(
container_scan_vuln_count
)
expect
(
mergerequest
).
to
have_dast_vulnerability_count_of
(
dast_vuln_count
)
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