Add test to ensure MR widget vulnerabilities are sorted
What does this MR do?
This MR makes sure that vulnerabilities that are listed in MR widget are sorted by severity and confidence. As side effect of this !18675 (merged) we already established that. We just added some tests to make sure we have correct behaviour. Following class is populating MR widget vulnerabilities;
class VulnerabilityReportsComparer
def added
head_report - base_report
end
def fixed
base_report - head_report
end
def existing
head_report & base_report
end
end
We will feed this object with sorted head and sorted base reports. According to https://apidock.com/ruby/Array/difference , order will be preserved.
Screenshots
Does this MR meet the acceptance criteria?
Conformity
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec tea
Edited by Can Eldem