Commit db268005 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'Fix_Dimiss_Checkbox_Security_Dashboard' into 'master'

changed the default value of checkbox to false from a dynamic value on first page load

Closes #220174

See merge request gitlab-org/gitlab!36646
parents b907e79a 52dc5f1d
...@@ -103,6 +103,9 @@ export default { ...@@ -103,6 +103,9 @@ export default {
return Object.keys(this.filters).length > 0; return Object.keys(this.filters).length > 0;
}, },
hasSelectedAllVulnerabilities() { hasSelectedAllVulnerabilities() {
if (!this.vulnerabilities.length) {
return false;
}
return this.numOfSelectedVulnerabilities === this.vulnerabilities.length; return this.numOfSelectedVulnerabilities === this.vulnerabilities.length;
}, },
numOfSelectedVulnerabilities() { numOfSelectedVulnerabilities() {
......
---
title: changed the default value of checkbox to false from a dynamic value on first
page load
merge_request: 36646
author: Uday Aggarwal @uday.agg97
type: fixed
...@@ -318,6 +318,11 @@ describe('Vulnerability list component', () => { ...@@ -318,6 +318,11 @@ describe('Vulnerability list component', () => {
expect(findDashboardHasNoVulnerabilities().exists()).toEqual(true); expect(findDashboardHasNoVulnerabilities().exists()).toEqual(true);
expect(findFiltersProducedNoResults().exists()).toEqual(false); expect(findFiltersProducedNoResults().exists()).toEqual(false);
}); });
it('should not show the vulnerability check-all checkbox as checked with no vulnerabilities', () => {
expect(findDataCell('vulnerability-checkbox-all').exists()).toBe(true);
expect(findDataCell('vulnerability-checkbox-all').element.checked).toBe(false);
});
}); });
describe('with no vulnerabilities when there are filters', () => { describe('with no vulnerabilities when there are filters', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment