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
1daa02f8
Commit
1daa02f8
authored
Jan 17, 2020
by
Aleksandr Soborov
Committed by
Dan Davison
Jan 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Break out the Secure report into a page object component
Additionally change page objects to use this new component.
parent
5fdb7ced
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
65 deletions
+49
-65
ee/app/assets/javascripts/security_dashboard/components/security_dashboard_table.vue
...ecurity_dashboard/components/security_dashboard_table.vue
+1
-1
qa/qa/ee.rb
qa/qa/ee.rb
+1
-0
qa/qa/ee/page/component/secure_report.rb
qa/qa/ee/page/component/secure_report.rb
+38
-0
qa/qa/ee/page/group/secure/show.rb
qa/qa/ee/page/group/secure/show.rb
+3
-19
qa/qa/ee/page/project/pipeline/show.rb
qa/qa/ee/page/project/pipeline/show.rb
+1
-26
qa/qa/ee/page/project/secure/show.rb
qa/qa/ee/page/project/secure/show.rb
+3
-19
qa/qa/ee/page/project/settings/merge_request.rb
qa/qa/ee/page/project/settings/merge_request.rb
+2
-0
No files found.
ee/app/assets/javascripts/security_dashboard/components/security_dashboard_table.vue
View file @
1daa02f8
...
@@ -43,7 +43,7 @@ export default {
...
@@ -43,7 +43,7 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"ci-table js-security-dashboard-table"
>
<div
class=
"ci-table js-security-dashboard-table"
data-qa-selector=
"security_report_content"
>
<div
<div
class=
"gl-responsive-table-row table-row-header vulnerabilities-row-header px-2"
class=
"gl-responsive-table-row table-row-header vulnerabilities-row-header px-2"
role=
"row"
role=
"row"
...
...
qa/qa/ee.rb
View file @
1daa02f8
...
@@ -15,6 +15,7 @@ module QA
...
@@ -15,6 +15,7 @@ module QA
module
Component
module
Component
autoload
:DesignManagement
,
'qa/ee/page/component/design_management'
autoload
:DesignManagement
,
'qa/ee/page/component/design_management'
autoload
:LicenseManagement
,
'qa/ee/page/component/license_management'
autoload
:LicenseManagement
,
'qa/ee/page/component/license_management'
autoload
:SecureReport
,
'qa/ee/page/component/secure_report'
module
IssueBoard
module
IssueBoard
autoload
:Show
,
'qa/ee/page/component/issue_board/show'
autoload
:Show
,
'qa/ee/page/component/issue_board/show'
...
...
qa/qa/ee/page/component/secure_report.rb
0 → 100644
View file @
1daa02f8
# frozen_string_literal: true
module
QA
module
EE
module
Page
module
Component
module
SecureReport
def
self
.
prepended
(
page
)
page
.
module_eval
do
view
'ee/app/assets/javascripts/security_dashboard/components/filter.vue'
do
element
:filter_dropdown
,
':data-qa-selector="qaSelector"'
# rubocop:disable QA/ElementWithPattern
element
:filter_dropdown_content
end
view
'ee/app/assets/javascripts/security_dashboard/components/security_dashboard_table_row.vue'
do
element
:vulnerability_info_content
end
end
end
def
filter_report_type
(
report
)
click_element
(
:filter_report_type_dropdown
)
within_element
(
:filter_dropdown_content
)
do
click_on
report
end
# Click the dropdown to close the modal and ensure it isn't open if this function is called again
click_element
(
:filter_report_type_dropdown
)
end
def
has_vulnerability?
(
name
)
has_element?
(
:vulnerability_info_content
,
text:
name
)
end
end
end
end
end
end
qa/qa/ee/page/group/secure/show.rb
View file @
1daa02f8
...
@@ -5,13 +5,10 @@ module QA
...
@@ -5,13 +5,10 @@ module QA
module
Page
module
Page
module
Group::Secure
module
Group::Secure
class
Show
<
QA
::
Page
::
Base
class
Show
<
QA
::
Page
::
Base
view
'ee/app/assets/javascripts/security_dashboard/components/filter.vue'
do
include
Page
::
Component
::
SecureReport
element
:filter_dropdown
,
':data-qa-selector="qaSelector"'
# rubocop:disable QA/ElementWithPattern
element
:filter_dropdown_content
end
view
'ee/app/assets/javascripts/security_dashboard/components/security_dashboard_table
_row
.vue'
do
view
'ee/app/assets/javascripts/security_dashboard/components/security_dashboard_table.vue'
do
element
:
vulnerability_info_content
element
:
security_report_content
,
required:
true
end
end
def
filter_project
(
project
)
def
filter_project
(
project
)
...
@@ -20,19 +17,6 @@ module QA
...
@@ -20,19 +17,6 @@ module QA
click_on
project
click_on
project
end
end
end
end
def
filter_report_type
(
report
)
click_element
(
:filter_report_type_dropdown
)
within_element
(
:filter_dropdown_content
)
do
click_on
report
end
# Click the dropdown to close the modal and ensure it isn't open if this function is called again
click_element
(
:filter_report_type_dropdown
)
end
def
has_vulnerability?
(
name
)
has_element?
(
:vulnerability_info_content
,
text:
name
)
end
end
end
end
end
end
end
...
...
qa/qa/ee/page/project/pipeline/show.rb
View file @
1daa02f8
...
@@ -5,6 +5,7 @@ module QA::EE
...
@@ -5,6 +5,7 @@ module QA::EE
module
Pipeline
module
Pipeline
module
Show
module
Show
include
Page
::
Component
::
LicenseManagement
include
Page
::
Component
::
LicenseManagement
include
Page
::
Component
::
SecureReport
def
self
.
prepended
(
page
)
def
self
.
prepended
(
page
)
page
.
module_eval
do
page
.
module_eval
do
...
@@ -13,19 +14,6 @@ module QA::EE
...
@@ -13,19 +14,6 @@ module QA::EE
element
:licenses_tab
element
:licenses_tab
element
:licenses_counter
element
:licenses_counter
end
end
view
'ee/app/assets/javascripts/security_dashboard/components/filter.vue'
do
element
:filter_dropdown
,
':data-qa-selector="qaSelector"'
# rubocop:disable QA/ElementWithPattern
element
:filter_dropdown_content
end
view
'ee/app/views/projects/pipelines/_tabs_holder.html.haml'
do
element
:security_tab
end
view
'ee/app/assets/javascripts/security_dashboard/components/security_dashboard_table_row.vue'
do
element
:vulnerability_info_content
end
end
end
end
end
...
@@ -33,15 +21,6 @@ module QA::EE
...
@@ -33,15 +21,6 @@ module QA::EE
click_element
(
:security_tab
)
click_element
(
:security_tab
)
end
end
def
filter_report_type
(
report
)
click_element
(
:filter_report_type_dropdown
)
within_element
(
:filter_dropdown_content
)
do
click_on
report
end
# Click the dropdown to close the modal and ensure it isn't open if this function is called again
click_element
(
:filter_report_type_dropdown
)
end
def
click_on_licenses
def
click_on_licenses
click_element
(
:licenses_tab
)
click_element
(
:licenses_tab
)
end
end
...
@@ -49,10 +28,6 @@ module QA::EE
...
@@ -49,10 +28,6 @@ module QA::EE
def
has_license_count_of?
(
count
)
def
has_license_count_of?
(
count
)
find_element
(
:licenses_counter
).
has_content?
(
count
)
find_element
(
:licenses_counter
).
has_content?
(
count
)
end
end
def
has_vulnerability?
(
name
)
has_element?
(
:vulnerability_info_content
,
text:
name
)
end
end
end
end
end
end
end
...
...
qa/qa/ee/page/project/secure/show.rb
View file @
1daa02f8
...
@@ -5,26 +5,10 @@ module QA
...
@@ -5,26 +5,10 @@ module QA
module
Page
module
Page
module
Project::Secure
module
Project::Secure
class
Show
<
QA
::
Page
::
Base
class
Show
<
QA
::
Page
::
Base
view
'ee/app/assets/javascripts/security_dashboard/components/filter.vue'
do
include
Page
::
Component
::
SecureReport
element
:filter_dropdown
,
':data-qa-selector="qaSelector"'
# rubocop:disable QA/ElementWithPattern
element
:filter_dropdown_content
end
view
'ee/app/assets/javascripts/security_dashboard/components/security_dashboard_table_row.vue'
do
element
:vulnerability_info_content
end
def
filter_report_type
(
report
)
click_element
(
:filter_report_type_dropdown
)
within_element
(
:filter_dropdown_content
)
do
click_on
report
end
# Click the dropdown to close the modal and ensure it isn't open if this function is called again
click_element
(
:filter_report_type_dropdown
)
end
def
has_vulnerability?
(
name
)
view
'ee/app/assets/javascripts/security_dashboard/components/security_dashboard_table.vue'
do
has_element?
(
:vulnerability_info_content
,
text:
name
)
element
:security_report_content
,
required:
true
end
end
end
end
end
end
...
...
qa/qa/ee/page/project/settings/merge_request.rb
View file @
1daa02f8
...
@@ -6,6 +6,8 @@ module QA
...
@@ -6,6 +6,8 @@ module QA
module
Project
module
Project
module
Settings
module
Settings
module
MergeRequest
module
MergeRequest
include
Page
::
Component
::
SecureReport
def
self
.
prepended
(
page
)
def
self
.
prepended
(
page
)
page
.
module_eval
do
page
.
module_eval
do
view
'ee/app/views/projects/_merge_pipelines_settings.html.haml'
do
view
'ee/app/views/projects/_merge_pipelines_settings.html.haml'
do
...
...
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