Commit 143b48a4 authored by Filipa Lacerda's avatar Filipa Lacerda

Update actions test in security reports

parent 3690691b
...@@ -29,7 +29,8 @@ export const groupedDependencyText = ({ dependencyScanning }) => ...@@ -29,7 +29,8 @@ export const groupedDependencyText = ({ dependencyScanning }) =>
dependencyScanning.resolvedIssues.length, dependencyScanning.resolvedIssues.length,
); );
export const groupedSummaryText = ({ added, fixed }, getters) => { export const groupedSummaryText = (state, getters) => {
const { added, fixed } = state.summaryCounts;
// All reports returned error // All reports returned error
if (getters.allReportsHaveError) { if (getters.allReportsHaveError) {
return s__('ciReport|Security scanning failed loading any results'); return s__('ciReport|Security scanning failed loading any results');
......
...@@ -74,6 +74,7 @@ describe('security reports actions', () => { ...@@ -74,6 +74,7 @@ describe('security reports actions', () => {
payload: 'path', payload: 'path',
}, },
], ],
[],
done, done,
); );
}); });
...@@ -108,6 +109,7 @@ describe('security reports actions', () => { ...@@ -108,6 +109,7 @@ describe('security reports actions', () => {
type: types.REQUEST_SAST_REPORTS, type: types.REQUEST_SAST_REPORTS,
}, },
], ],
[],
done, done,
); );
}); });
...@@ -125,6 +127,7 @@ describe('security reports actions', () => { ...@@ -125,6 +127,7 @@ describe('security reports actions', () => {
payload: {}, payload: {},
}, },
], ],
[],
done, done,
); );
}); });
...@@ -214,7 +217,7 @@ describe('security reports actions', () => { ...@@ -214,7 +217,7 @@ describe('security reports actions', () => {
}, },
{ {
type: 'receiveSastReports', type: 'receiveSastReports',
payload: { head: sastIssues }, payload: { head: sastIssues, base: null },
}, },
], ],
done, done,
...@@ -399,7 +402,7 @@ describe('security reports actions', () => { ...@@ -399,7 +402,7 @@ describe('security reports actions', () => {
}, },
{ {
type: 'receiveSastContainerReports', type: 'receiveSastContainerReports',
payload: { head: dockerReport }, payload: { head: dockerReport, base: null },
}, },
], ],
done, done,
...@@ -583,7 +586,7 @@ describe('security reports actions', () => { ...@@ -583,7 +586,7 @@ describe('security reports actions', () => {
}, },
{ {
type: 'receiveDastReports', type: 'receiveDastReports',
payload: { head: dast }, payload: { head: dast, base: null },
}, },
], ],
done, done,
...@@ -767,7 +770,7 @@ describe('security reports actions', () => { ...@@ -767,7 +770,7 @@ describe('security reports actions', () => {
}, },
{ {
type: 'receiveDependencyScanningReports', type: 'receiveDependencyScanningReports',
payload: { head: sastIssues }, payload: { head: sastIssues, base: null },
}, },
], ],
done, 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