diff options
Diffstat (limited to 'spec/frontend/reports/codequality_report/mock_data.js')
-rw-r--r-- | spec/frontend/reports/codequality_report/mock_data.js | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/spec/frontend/reports/codequality_report/mock_data.js b/spec/frontend/reports/codequality_report/mock_data.js index 9bd61527d3f..c5cecb34509 100644 --- a/spec/frontend/reports/codequality_report/mock_data.js +++ b/spec/frontend/reports/codequality_report/mock_data.js @@ -88,3 +88,53 @@ export const issueDiff = [ urlPath: 'headPath/lib/six.rb#L6', }, ]; + +export const reportIssues = { + status: 'failed', + new_errors: [ + { + description: + 'Method `long_if` has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.', + severity: 'minor', + file_path: 'codequality.rb', + line: 5, + }, + ], + resolved_errors: [ + { + description: 'Insecure Dependency', + severity: 'major', + file_path: 'lib/six.rb', + line: 22, + }, + ], + existing_errors: [], + summary: { total: 3, resolved: 0, errored: 3 }, +}; + +export const parsedReportIssues = { + newIssues: [ + { + description: + 'Method `long_if` has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.', + file_path: 'codequality.rb', + line: 5, + name: + 'Method `long_if` has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.', + path: 'codequality.rb', + severity: 'minor', + urlPath: 'null/codequality.rb#L5', + }, + ], + resolvedIssues: [ + { + description: 'Insecure Dependency', + file_path: 'lib/six.rb', + line: 22, + name: 'Insecure Dependency', + path: 'lib/six.rb', + severity: 'major', + urlPath: 'null/lib/six.rb#L22', + }, + ], +}; |