Commit 7e67f483 authored by nanmu42's avatar nanmu42

Fix code quality report display

Changelog: fixed
parent 5edeedc0
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
return `${this.severityLabel} - ${this.issue.name}`; return `${this.severityLabel} - ${this.issue.name}`;
}, },
issueSeverity() { issueSeverity() {
return this.issue.severity.toLowerCase(); return this.issue.severity?.toLowerCase();
}, },
isStatusSuccess() { isStatusSuccess() {
return this.status === STATUS_SUCCESS; return this.status === STATUS_SUCCESS;
......
...@@ -51,6 +51,7 @@ describe('code quality issue body issue body', () => { ...@@ -51,6 +51,7 @@ describe('code quality issue body issue body', () => {
${'blocker'} | ${'text-danger-800'} | ${'severity-critical'} ${'blocker'} | ${'text-danger-800'} | ${'severity-critical'}
${'unknown'} | ${'text-secondary-400'} | ${'severity-unknown'} ${'unknown'} | ${'text-secondary-400'} | ${'severity-unknown'}
${'invalid'} | ${'text-secondary-400'} | ${'severity-unknown'} ${'invalid'} | ${'text-secondary-400'} | ${'severity-unknown'}
${undefined} | ${'text-secondary-400'} | ${'severity-unknown'}
`( `(
'renders correct icon for "$severity" severity rating', 'renders correct icon for "$severity" severity rating',
({ severity, iconClass, iconName }) => { ({ severity, iconClass, iconName }) => {
......
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