Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab
Commits
09f1dc6a
Verified
Commit
09f1dc6a
authored
9 months ago
by
Harsha Muralidhar
Committed by
GitLab
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix E2E govern specs for filtered search feature flag
parent
ce90ff0f
No related branches found
No related tags found
2 merge requests
!162233
Draft: Script to update Topology Service Gem
,
!153366
Fix E2E govern specs for filtered search feature flag
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
qa/qa/ee/page/component/secure_report.rb
+41
-6
41 additions, 6 deletions
qa/qa/ee/page/component/secure_report.rb
qa/qa/specs/features/ee/browser_ui/10_govern/change_vulnerability_status_spec.rb
+1
-2
1 addition, 2 deletions
.../browser_ui/10_govern/change_vulnerability_status_spec.rb
with
42 additions
and
8 deletions
qa/qa/ee/page/component/secure_report.rb
+
41
−
6
View file @
09f1dc6a
...
...
@@ -47,16 +47,26 @@ def status_listbox_item_selector(report)
end
def
filter_by_status
(
statuses
)
wait_until
(
max_duration:
30
,
message:
"Waiting for status dropdown element to appear"
)
do
has_element?
(
'filter-status-dropdown'
)
end
if
has_element?
(
'group-by-new-feature'
)
within_element
(
'group-by-new-feature'
)
do
click_element
(
'close-button'
)
end
end
if
has_element?
(
'filtered-search-token'
,
wait:
10
)
filter_by_status_new
(
statuses
)
else
filter_by_status_old
(
statuses
)
end
state
=
statuses_list
(
statuses
).
map
{
|
item
|
"state=
#{
item
}
"
}.
join
(
"&"
)
raise
'Status unchanged in the URL'
unless
page
.
current_url
.
downcase
.
include?
(
state
)
end
def
filter_by_status_old
(
statuses
)
wait_until
(
max_duration:
30
,
message:
"Waiting for status dropdown element to appear"
)
do
has_element?
(
'filter-status-dropdown'
)
end
# Retry on exception to avoid ElementNotFound errors when clicks are sent too fast for the UI to update
retry_on_exception
(
sleep_interval:
2
,
message:
"Retrying status click until current url matches state"
)
do
find
(
status_dropdown_button_selector
,
wait:
5
).
click
...
...
@@ -66,11 +76,23 @@ def filter_by_status(statuses)
wait_for_requests
# It takes a moment to update the page after changing selections
end
find
(
status_dropdown_button_selector
,
wait:
5
).
click
state
=
statuses_list
(
statuses
).
map
{
|
item
|
"state=
#{
item
}
"
}.
join
(
"&"
)
page
.
current_url
.
downcase
.
include?
(
state
)
end
end
def
filter_by_status_new
(
statuses
)
click_element
(
'clear-icon'
)
click_element
(
'filtered-search-token-segment'
)
click_link
(
'Status'
)
click_link
(
'All statuses'
)
statuses_list_advanced_filter
(
statuses
).
each
do
|
status
|
click_link
(
status
)
unless
status
==
'Dismissed'
click_link
(
'All dismissal reasons'
)
if
status
==
'Dismissed'
wait_for_requests
end
click_element
(
'search-button'
)
click_element
(
'search-button'
)
# second click removes the dynamic dropdown
end
def
statuses_list
(
statuses
)
statuses
.
map
do
|
status
|
case
status
...
...
@@ -84,6 +106,19 @@ def statuses_list(statuses)
end
end
def
statuses_list_advanced_filter
(
statuses
)
statuses
.
map
do
|
status
|
case
status
when
/all/i
'All statuses'
when
/needs triage/i
'Needs triage'
else
status
.
capitalize
end
end
end
def
status_dropdown_button_selector
"[data-testid='filter-status-dropdown'] > button"
end
...
...
This diff is collapsed.
Click to expand it.
qa/qa/specs/features/ee/browser_ui/10_govern/change_vulnerability_status_spec.rb
+
1
−
2
View file @
09f1dc6a
...
...
@@ -27,7 +27,6 @@ module QA
let
(
:vuln_name
)
{
"Greyhound vulnerability"
}
let
(
:dismissed_state
)
{
"dismissed"
}
let
(
:dismissal_reason
)
{
"false_positive"
}
let
(
:confirmed_state
)
{
"confirmed"
}
let
(
:resolved_state
)
{
"resolved"
}
let
(
:vuln_status_hash
)
{
{
resolved:
'resolve'
,
confirmed:
'confirm'
}
}
...
...
@@ -68,7 +67,7 @@ module QA
verify_changed_status
(
confirmed_state
)
end
it
'can bulk dismiss vulnerabilities as
false positiv
e in vulnerability report'
,
:blocking
,
it
'can bulk dismiss vulnerabilities as
not applicabl
e in vulnerability report'
,
:blocking
,
testcase:
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/415647'
do
Page
::
Project
::
Menu
.
perform
(
&
:go_to_vulnerability_report
)
bulk_change_status
(
dismissed_state
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment