Commit 1f57c998 authored by Clement Ho's avatar Clement Ho

Merge branch '11560-exclude-forks-security-dashboard' into 'master'

Exclude shared projects from Group Security Dashboard filter

See merge request gitlab-org/gitlab!14667
parents 3921e1d2 69164247
...@@ -10,6 +10,7 @@ const getAllProjects = (url, page = '1', projects = []) => ...@@ -10,6 +10,7 @@ const getAllProjects = (url, page = '1', projects = []) =>
page, page,
include_subgroups: true, include_subgroups: true,
with_security_reports: true, with_security_reports: true,
with_shared: false,
order_by: 'path', order_by: 'path',
sort: 'asc', sort: 'asc',
}, },
......
---
title: Exclude forks from Group Security Dashboard filter
merge_request: 14667
author:
type: fixed
...@@ -27,8 +27,20 @@ describe('projects actions', () => { ...@@ -27,8 +27,20 @@ describe('projects actions', () => {
}); });
describe('on success', () => { describe('on success', () => {
const expectedParams = {
include_subgroups: true,
with_security_reports: true,
with_shared: false,
};
beforeEach(() => { beforeEach(() => {
mock.onGet(state.projectsEndpoint).replyOnce(200, data); mock.onGet(state.projectsEndpoint).replyOnce(config => {
const hasExpectedParams = Object.keys(expectedParams).every(
param => config.params[param] === expectedParams[param],
);
return hasExpectedParams ? [200, data] : [400];
});
}); });
it('should dispatch the request and success actions', done => { it('should dispatch the request and success actions', done => {
......
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